0

What is the best way to make Sphinx not use full-text search on conditions? So if I query for "Bannana", and set a condition that the "type" must be "fruit", exactly. So it wouldn't do a full-text search on the condition and return results with the type as "fruits".

Hope that makes sense, Thanks in advance!

2 Answers2

0

If I understand you correctly, the condition must be set as an attribute in sphinx. This will allow you to filter on the attribute and only return records of type "fruits".

Imraan
  • 657
  • 1
  • 5
  • 10
  • 2
    be careful though cant filter on string attrributes, only numeric attributes. Can use something like CRC32 to make a number from a string tho. – barryhunter Oct 01 '12 at 12:39
0

Can use http://sphinxsearch.com/docs/current.html#conf-index-exact-words

to make sure not match stemmed versions. I've no idea how to set that via thinking-sphinx.

Then can do

bannana @type =fruit

as the text query.

barryhunter
  • 20,886
  • 3
  • 30
  • 43