所以我最近在一个rails项目中使用了Sphinx,我想提供一个列表,列出一个与给定条件100%匹配的'would be'精确匹配。例如:
+==================+==========================================================+
| ingredient | exact matches |
+==================+==========================================================+
| cheese, cream | 'cream cheese','philadephia cream cheese','cream chese',|
| | 'creamed cheese' |
+------------------+----------------------------------------------------------+
| Cheese, gruyere | 'gruyere','gruyer cheese','gruyeres cheese' |
| | 'gruyere chese' |
+------------------+----------------------------------------------------------+
| Cheese, blue | 'blue cheese','blu cheese' |
+------------------+----------------------------------------------------------+
这可能吗?好像其他人以前也有这个问题。。。不?
我想最好的答案可能是把
exact matches
列并提供一个非常高的权重的条款。
我不知道怎样才能打破“数组”,看看搜索词是否完全匹配,虽然。。。