When you search "Stack Overflow", Sphinx will not bring up results that match "Stackoverflow"
That's because Sphinx indexes "Stackoverflow开发者_运维技巧" as one word...whereas the query is two words.
Does anyone know how to fix this? (like Google...they can join the query !)
You can use the wordforms feature to map words to different words, or to match many words to a single word. If you have a lot of words you want to correct, you could do this. I think if you used this feature you would only have to do a single search, and it would probably be faster than doing an "or" search.
There's no need to tamper with data being fed to Sphinx. All you need to do is to slightly modify the search request to Sphinx in your form processing code so that it contained various combinations of search terms and use SPH_MATCH_EXTENDED matching mode. In particular, for your example
(Stack Overflow) | stackoverflow
Couldn't you just combine the search terms into one words before sending them to sphinx? You would need to do all permuations of serach terms, ie my search term
as mysearch
, mysearchterm
, and searchterm
, but that seems like it would work.
精彩评论