Is it possible to use Sphinx search with dynamic conditions?

Posted by Fedyashev Nikita on Stack Overflow See other posts from Stack Overflow or by Fedyashev Nikita
Published on 2010-05-19T09:57:12Z Indexed on 2010/05/19 10:00 UTC
Read the original article Hit count: 210

In my web app I need to perform 3 types of searching on items table with the following conditions:

  1. items.is_public = 1 (use title field for indexing) - a lot of results can be retrieved(cardinality is much higher than in other cases)

  2. items.category_id = {X} (use title + private_notes fields for indexing) - usually less than 100 results

  3. items.user_id = {X} (use title + private_notes fields for indexing) - usually less than 100 results

I can't find a way to make Sphinx work in all these cases, but it works well in 1st case. Should I use Sphinx just for the 1st case and use plain old "slow" FULLTEXT searching in MySQL(at least because of lower cardinality in 2-3 cases)?

Or is it just me and Sphinx can do pretty much everything?

© Stack Overflow or respective owner

Related posts about sphinx

Related posts about full-text-search