Вопрос

I am using Sphinx, but not fully understanding how SetFilter works. My assumption as of now is that in the Sphinx Config I have my query:

 SELECT ID, Kittens, Puppies FROM db_animals;

And then I put in the attributes I would like to filter on:

 sql_attr_uint = puppies

Then when I call Sphinx if I want to filter on one of these attributes I put this:

 $cl->SetFilter( 'puppies', array($puppyID));

So, if $puppyID = 7

Sphinx will only return rows where the puppies column is set to 7.

Am I interpreting this correctly? Anything wrong here?

Это было полезно?

Решение

Yes to your first question. And no to the second.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top