How to check if sphinx matched all the words?
In Sphinx QL, I have queries of form :
SELECT id FROM index WHERE MATCH('word1|word2|word3') OPTION ranker=matchany, max_matches=100;
Is there a native way to check if all the words where successfully matched with at least one document? Note that it might not have to be a single document. For instance, word1
can match document1
, word2
can match document2
and word3
can match document3
. The result is a success here. Assume there was no match for 开发者_如何转开发word3
, the result is a failure then.
Try running SHOW META right after the query - Will give you per keyword hit count
http://sphinxsearch.com/docs/2.0.1/sphinxql-show-meta.html
To make sure that all words got matched at same document you have to issue 2nd query SELECT id FROM index WHERE MATCH('word1 word2 word3');
精彩评论