Sphinx SetFilter limitation

Few days back, i encountered an sphinx issue that, if you use $sphinx->setfilter() with exclude fields option, it does not allow more than 4096 items in exlusion array.


Add multiple $sphinx->setfilter() calls with same filter field and spliting exclusion array in chunks of 4096 items.
It may be limitation in PHP implementation of sphinx, but multiple calls worked.

The other solution was to create proper index with exlusion rule, which i was not in mood of.

Just shared to help someone!

Share your thoughts & feedback

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: