环境- solr-8.9.0
.csv文件形式中的电影数据已经在apache中进行了索引。
电影数据
name,directed_by,genre,type,id,initial_release_date
.45,Gary Lennon,Black comedy|Thriller|Psychological thriller|Indie film|Action Film|Crime Thriller|Crime Fiction|Drama,,/en/45_2006,2006-11-30
9,Shane Acker,Computer Animation|Animation|Apocalyptic and post-apocalyptic fiction|Science Fiction|Short Film|Thriller|Fantasy,,/en/9_2005,2005-04-21
Bomb the System,Adam Bhala Lough,Crime Fiction|Indie film|Coming of age|Drama,,/en/bomb_the_system,
movie_name,Adam Bhala,Animation|Indie film|Coming of age|Drama,,/en/bomb_the_system,DisMax查询分析器已在“directed_by”字段上运行。“directed_by”字段在托管模式中映射为“text_general”字段类型。
我已经在solr上运行了以下查询
curl -G http://localhost:8983/solr/testCore1/select --data-urlencode "q=directed_by:'Adam Bhala Lough~'" --data-urlencode "defType=dismax" --data-urlencode "mm=2"但是上面的查询给出了0 'numFound‘作为响应。我期望以下字段与之匹配:
Adam Bhala
Adam Bhala Lough我希望以下字段不匹配:
Adam Gary Lennon尽管数据是在solr中索引的。我通过在没有disMax查询解析器的情况下运行以下查询对此进行了反复检查,并且它给出了响应。
curl -G http://localhost:8983/solr/testCore1/select --data-urlencode "q=directed_by:'Adam Bhala Lough~'"为什么dismax查询解析器没有按应有的方式运行?我知道mm(最小应该匹配) Parameter===>定义了必须匹配的最小子句数。
我花了好几个小时来解决这个问题。然而,我似乎找不到任何握住我手的东西。有人能帮我找到丢失的那块吗?
参考https://solr.apache.org/guide/8_9/the-dismax-query-parser.html
https://stackoverflow.com/questions/72770675
复制相似问题