문제

I have the following and several other strings indexed. All words are glued together.

Stringisaflexiblepieceofropeortwinewhichisusedtotie,bind,orhangotherobjects.

Which is a sentence from wikipedia.

String is a flexible piece of rope or twine which is used to tie, bind, or hang other objects.

I use SphinxQL to search for several words. E.g.

SELECT * FROM sentences WHERE MATCH('piece rope bind');

This should return the above string as a result, but it returns 0 rows.

How should the query look like to not look for words, but to simply match the words in a string?

I have played already with the ranker options like

SELECT * FROM sentences WHERE MATCH('piece rope bind') OPTION ranker=matchany';

but with no success.

Any help is much appreciated!

도움이 되었습니까?

해결책

Use min_infix_len - to enable infix searching http://sphinxsearch.com/docs/current.html#conf-min-infix-len

You probably want enable_star = 0

Or maybe you could use WordBreaker to rebreak the long string before indexing :) http://sphinxsearch.com/blog/2013/01/29/a-new-tool-in-the-trunk-wordbreaker/

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top