Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/solr/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
solr:如何在特定字段中搜索标记_Solr - Fatal编程技术网

solr:如何在特定字段中搜索标记

solr:如何在特定字段中搜索标记,solr,Solr,我想搜索字段中出现的特定标记: <field name="productTagValues" type="text_en" indexed="true" stored="true" multiValued="true" /> 我想检索所有具有特定标记的文档。例如,所有带有镀金标签的文档 我尝试使用fq=productTagValues:Gold Plating。但它也返回了productTagValues字段中没有镀金的文档 有人能帮我解决这个问题吗?正如我在评论中所说,解决办法是

我想搜索字段中出现的特定标记:

<field name="productTagValues" type="text_en" indexed="true" stored="true" multiValued="true" />
我想检索所有具有特定标记的文档。例如,
所有带有镀金标签的文档

我尝试使用fq=productTagValues:Gold Plating。但它也返回了
productTagValues
字段中没有镀金的文档


有人能帮我解决这个问题吗?正如我在评论中所说,解决办法是进行查询:

q=productTagValues:Gold Plating
而不是

fq=productTagValues:Gold Plating

如果您执行了
q=productTagValues:Gold Plating
,它还会返回没有镀金的文档吗?@BartlomiejLewandowski:在前30名中(我能看到),它会返回所需的结果。但是numFound远远大于expected@BartlomiejLewandowski:我的坏朋友,它能用。谢谢你的帮助:)。那我就写这个作为回答。
fq=productTagValues:Gold Plating