我想通過使用我們的rails 3應用程序中的思維獅身人面像與獅身人面像&配合使用法定人數來使我們的搜索更加精確。Rails&ThinkingSphinx:法定匹配百分比不起作用?
簡而言之,使用%或浮點數值不工作,並生成以下錯誤:
syntax error, unexpected TOK_KEYWORD, expecting TOK_INT near '0.5
雖然獅身人面像的文件說,這應該工作:
Quorum matching operator introduces a kind of fuzzy matching. It will only match those documents that pass a given threshold of given words. The example above ("the world is a wonderful place"/3) will match all documents that have at least 3 of the 6 specified words. Operator is limited to 255 keywords. Instead of an absolute number, you can also specify a number between 0.0 and 1.0 (standing for 0% and 100%), and Sphinx will match only documents with at least the specified percentage of given words. The same example above could also have been written "the world is a wonderful place"/0.5 and it would match documents with at least 50% of the 6 words.
然而,當我使用一個非浮點值,例如/ 2它工作或者更確切地說搜索執行而不會產生錯誤。
任何人都可以看到爲什麼這可能會打破?
q它只在r3556中實現,因此需要像sphinx 2.0.7或更高版本。 – barryhunter
不知道它是否是Sphinx 2.1功能 - 它不適用於2.0.8。 – pat