0

私の経験はhttp://lucene.472066.n3.nabble.com/string-field-does-not-yield-exact-match-result-using-qf-parameter-td4060096.htmlの反対です

「qf」を dismax クエリに追加すると、完全に一致しない限り結果が得られません。

次のように NGramFilterFactory を使用しています。

 <fieldType name="text_edgengrams" class="solr.TextField">
   <analyzer type="index">
     <tokenizer class="solr.LowerCaseTokenizerFactory"/>
     <filter class="solr.NGramFilterFactory" minGramSize="3" maxGramSize="15"/>
   </analyzer>
   <analyzer type="query">
     <tokenizer class="solr.LowerCaseTokenizerFactory"/>
   </analyzer>
 </fieldType>

 ...


 <field name="text_ngrams" type="text_edgengrams" indexed="true" stored="false" multiValued="true" />

 ...

 <field name="domain" type="string" indexed="true" stored="true"/>

 ...

 <copyField source="domain" dest="text_ngrams"/>

インデックスに Yengas.com がある場合、yengas.com を検索できますが、yengas は検索できません。ただし、「qf」をドロップすると、yengas を検索できます。

検索例:

 $ curl "http://localhost:8282/solr/links/select?q=domain:yengas&wt=json&indent=on&fl=id,domain,score"
 => "response":{"numFound":0,"start":0,"docs":[]


 $ curl "http://localhost:8282/solr/links/select?q=domain:yengas.com&wt=json&indent=on&fl=id,domain,score"
 => "response":{"numFound":3,"start":0,"docs":[]

 $ curl "http://localhost:8282/solr/links/select?defType=dismax&q=yengas&qf=domain^4&pf=domain&ps=0&fl=id,domain,score"
 => "response":{"numFound":0,"start":0,"docs":[]


 $ curl "http://localhost:8282/solr/links/select?defType=dismax&q=yengas.com&pf=domain&ps=0&fl=id,domain,score"
 => "response":{"numFound":3,"start":0,"docs":[]

dismax および通常のクエリで部分一致が失敗します。

何が欠けている可能性がありますか?

4

1 に答える 1