简体   繁体   English

Solr邻近搜索,部分单词匹配

[英]Solr proximity search with partial word match

I have below values for my search in field in the solr index men shoes model1 men apparel model1 men shoes model2 men apparel model2 men workout model1 我在solr索引中的字段中具有以下值:男鞋模型1男服装模型1男鞋模型2男服装模型2男锻炼模型1

I am using proximity search to make sure a search - men shoes - will only return the below men shoes model1 men shoes model2 我正在使用邻近搜索来确保搜索-男鞋-仅返回以下男鞋model1男鞋model2

so i am transforming my search key to "men shoes"~5 所以我要把搜寻键改成「男鞋」〜5

The problem here is I want the search with keywork 'workout' and 'work out' should return me men workout model1 这里的问题是我希望搜索“锻炼”和“锻炼”的按键应该返回给我锻炼模型

So i changed the solr config to include the EdgeNGramTokenizerFactory. 所以我更改了solr配置,使其包含EdgeNGramTokenizerFactory。 But since i am using proximity search it always looks for exact match only. 但是由于我使用的是邻近搜索,因此它总是只寻找完全匹配的内容。 Thus the search with 'work out' is still not returning any result. 因此,“锻炼”搜索仍然不会返回任何结果。 I checked the index and it seems the work is tokenised properly. 我检查了索引,似乎工作已正确标记。

Please help! 请帮忙!

我使用的是EdgeNGramTokenTokenizerFactory,当我将其更改为NGramTokenizerFactory时,它就像一个魅力!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM