我在使用Solr搜索某些字段时遇到困难。我使用Solarium作为PHP代码和Apache Solr Search Server之间的“桥梁”。无法在Solr中搜索字段
当我在“product_name”上执行搜索时,它会成功返回,但是如果我在style_colour或style_number上搜索它则不会。我已经在架构中将这两个字段“编入索引”,AFAIK使它们成为可搜索的。
任何人都可以建议我在这里做错了吗?
模式:
<field name="product_name" type="text_general" indexed="true" stored="true"/>
<field name="style_colour" type="string" indexed="true" stored="true"/>
<field name="style_number" type="string" indexed="true" stored="true"/>
从Solr管理结果 “让我的一切” 查询:
<result name="response" numFound="1071" start="0">
<doc>
<str name="product_name">Farls</str>
<str name="style_colour">01701901701931</str>
<str name="style_number">017019</str>
</doc>
...
你如何查询这些字段?你的默认搜索字段是什么? – Jayendra
@Jayendra我怎样才能检查我的默认搜索字段是什么? – crmpicco
schema.xml文件应该提到defaultsearchfield,通常是文本字段。你是否也在查询特定的字段? solrconfig.xml中的任何特定请求处理程序?额外的细节将有助于提供合适的答案。 – Jayendra