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: 240
In my web app I need to perform 3 types of searching on items
table with the following conditions:
items.is_public = 1
(usetitle
field for indexing) - a lot of results can be retrieved(cardinality is much higher than in other cases)items.category_id = {X}
(usetitle
+private_notes
fields for indexing) - usually less than 100 resultsitems.user_id = {X}
(usetitle
+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