solr:字符串字段使用qf参数不会产生部分匹配结果

solr:字符串字段使用qf参数不会产生部分匹配结果,solr,solr4,dismax,Solr,Solr4,Dismax,我的经验与此相反 当我在Demax查询中添加'qf'时,除非有完全匹配,否则不会得到任何结果 我使用的NGramFilterFactory如下: <fieldType name="text_edgengrams" class="solr.TextField"> <analyzer type="index"> <tokenizer class="solr.LowerCaseTokenizerFactory"/> <filter

我的经验与此相反

当我在Demax查询中添加'qf'时,除非有完全匹配,否则不会得到任何结果

我使用的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"/>
部分匹配在Demax和normal查询中失败


我可能缺少什么?

CopyField不会更改原始字段。
此外,Copyfield不会将原始分析应用于复制的字段

文件@

复制在流源级别完成,没有复制馈送到另一个副本

将copyfield作为copyfield标记的源不起作用。
copyfield源必须是一个实际的字段,它有一些值,并且没有级联


因此,原始字段和复制字段的行为将与定义一致,在您的示例中是String和ngram

看起来部分匹配不适用于原始字段,而适用于复制到字段。这项工作
$curl“http://localhost:8282/solr/links/select?q=text_ngrams:yengas&wt=json&indent=on&fl=id,域,分数“
 $ 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":[]