[英]Does Solr's “More like this” support facet queries?
我已經能夠使用Dismax處理程序來介紹和突出顯示。
我嘗試對“更多類似此”結果進行分面 ,例如以下查詢:“獲取與'11qualcomm.doc'類似的文檔,其'doc_keywords'必須具有'Communication'。
select?
facet=on&facet.field=doc_keywords&facet.mincount=1
&fl=id,score
&fq=doc_keywords:%22Communication%22
&indent=true
&mlt=true&mlt.count=20
&mlt.fl=doc_keywords_searchable,doc_author_searchable,doc_abstract,text&mlt.mindf=1&mlt.mintf=1
&mlt.qf=doc_keywords_searchable%5E15+doc_author_searchable%5E15+doc_abstract%5E10+text
&q=id:%2211qualcomm.doc%22
&rows=1&wt=python
但是結果是:
'facet_counts':{
'facet_queries':{},
'facet_fields':{
'doc_keywords':[
'Communication',1,
'Corporation',1]},
'facet_dates':{},
'facet_ranges':{}}
這意味着構面僅適用於q = id:“ 11qualcomm.doc” ,不適用於MLT結果集。
構面適用於MLT結果集嗎? 如果是,我在做什么錯?
自己找到答案。 我應該使用More Like This處理程序,而不是使用搜索處理程序的MLT。 MLT處理程序“支持使用CommonQueryParameters進行構面,分頁和篩選”(來自Wiki)。
最近添加了過濾器查詢,以支持Solr More Like this功能。
https://issues.apache.org/jira/browse/SOLR-2351
但是,標記為該修補程序的版本是3.5和4.0,因此它可能不適用於您。
可以檢查補丁或升級。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.