我正在使用 Solr 来匹配短语。
指数数据:
id:1
keyword:"simple text|text with simple word |simple word text"
group:group1
id:2
keyword:"complex word| words with adjectives| text with adjective"
group:group2
我已经索引了由管道分隔的短语,这些短语属于 1 组
询问 :
"Document with simple text"
当我使用上述查询进行搜索时,我的搜索结果应该是
id:1
keyword:"simple text
Group: Group1
因为
查询包含上述短语中的所有单词,即:“simple”和“text”
谁能告诉我如何在 solr 中做到这一点?