TIMEX
TIMEX

Reputation: 272134

If anyone has used Sphinx Search engine before...do you know if it can join words?

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 !)

Upvotes: 2

Views: 516

Answers (3)

Kibbee
Kibbee

Reputation: 66132

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.

Upvotes: 2

codeholic
codeholic

Reputation: 5848

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

Upvotes: 1

Byron Whitlock
Byron Whitlock

Reputation: 53911

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.

Upvotes: 0

Related Questions