Solr edismax不使用逻辑运算符AND / OR

时间:2018-10-31 20:48:38

标签: solr edismax

刚遇到一个问题,即我们的solr 6.6似乎没有使用逻辑运算符(AND,OR,NOT)作为运算符,但实际上是在搜索单词。因此,只有几百个匹配的结果现在有数千个。我们正在使用edismax解析器。

单独查询:Apple和Google

"debug":{
"rawquerystring":"Apple AND Google",
"querystring":"Apple AND Google",
"parsedquery":"(+(DisjunctionMaxQuery((cm_city_t:apple | cm_credit_t:apple | cm_notes_t:apple | cm_state_t:apple | cm_country_t:apple | cm_description_t:apple | cm_caption_writer_s:Apple | cm_photographer_t:apple)) DisjunctionMaxQuery((cm_city_t:and | cm_credit_t:and | cm_notes_t:and | cm_state_t:and | cm_country_t:and | cm_description_t:and | cm_caption_writer_s:AND | cm_photographer_t:and)) DisjunctionMaxQuery((cm_city_t:google | cm_credit_t:google | cm_notes_t:google | cm_state_t:google | cm_country_t:google | cm_description_t:google | cm_caption_writer_s:Google | cm_photographer_t:google))))/no_coord",
"parsedquery_toString":"+((cm_city_t:apple | cm_credit_t:apple | cm_notes_t:apple | cm_state_t:apple | cm_country_t:apple | cm_description_t:apple | cm_caption_writer_s:Apple | cm_photographer_t:apple) (cm_city_t:and | cm_credit_t:and | cm_notes_t:and | cm_state_t:and | cm_country_t:and | cm_description_t:and | cm_caption_writer_s:AND | cm_photographer_t:and) (cm_city_t:google | cm_credit_t:google | cm_notes_t:google | cm_state_t:google | cm_country_t:google | cm_description_t:google | cm_caption_writer_s:Google | cm_photographer_t:google))",

"QParser":"ExtendedDismaxQParser",
"altquerystring":null,
"boost_queries":null,
"parsed_boost_queries":[],
"boostfuncs":null,
"filter_queries":["an_sas_s:\"Photo System \\- P1\" AND an_security_group_s:\"P1.Leaders\""],
"parsed_filter_queries":["+an_sas_s:Photo System - P1 +an_security_group_s:P1.Leaders"],

您可以看到“和”作为搜索字词包含在我们的字段中。我不确定为什么要这么做。我发现,如果我使用dismax解析器,则可以正常工作。我是开发和使用solr的新手,但是我的理解是edismax是更好使用的解析器,应该更加先进。这可能是响应处理程序或其他原因造成的配置问题吗?

0 个答案:

没有答案