简体   繁体   English

Solr Ngram同义词Dismax

[英]Solr Ngram Synonyms Dismax

I have ngram-indexed 2 fields (columns in the database) and the third one is my full text field. 我有ngram-indexed 2字段(数据库中的列),第三个是我的全文本字段。 Now my default text field is the full text field and while querying I use dismax handler and specify in it both the ngrammed field with certain boost values and also full text field with a certain boost value. 现在,我的默认文本字段为全文字段,在查询时,我使用dismax处理程序,并在其中指定具有特定增强值的ngrammed字段和具有特定增强值的全文字段。

Problem for me if I dont use dismax and just search full text field(ie default field specified in schema) synonyms work correctly ie ca returns all results where california is there whereas if i use dismax ca is also searched in the ngrammed fields and return partial matches of the word ca and does not go at all in the synonym part. 对我来说,如果我不使用dismax而是仅搜索全文本字段(即,在架构中指定的默认字段)同义词,则工作正常,即ca返回加利福尼亚存在的所有结果,而如果我使用dismax,则也在ngrammed字段中搜索ca并返回不完整的部分单词ca的匹配项,在同义词部分根本不存在。

I want to use synonyms in every case so how should I go about it? 我想在所有情况下都使用同义词,那么我应该如何处理呢?

Ensure you already correctly configured the "SynonymFilterFactory" filter in your ngram field's query analyzer. 确保已在ngram字段的查询分析器中正确配置了“ SynonymFilterFactory”过滤器。

If still doesn't work, the Solr admin's analysis interface can give more details of the tokenize/filter procedures, through which can check if the Synonym part already works as expected. 如果仍然无法使用,Solr管理员的分析界面可以提供令牌化/过滤器过程的更多详细信息,通过它可以检查同义词部分是否已按预期工作。

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

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