apache solr的方面动态字段 [英] facet dynamic fields with apache solr
问题描述
我在ApacheSolr中定义了动态字段:
I have defined dynamic field in ApacheSolr:
我用它来存储产品功能,例如:color_feature,diameter_feature,material_feature等.这些字段的数量不是恒定的,因为产品在变化.
I use it to store products features like: color_feature, diameter_feature, material_feature and so on. Number of those fields are not constant becouse products are changing.
是否可以通过相同的查询获得所有这些动态字段的结果,或者我是否需要始终在查询中编写所有字段,例如... facet.field=color_feature&facet.field=diameter_feature&facet.field=material_feature&facet.field=
...
Is it possible to get facet result for all those dynamic fields with the same query or do I need to write always all fields in a query like ... facet.field=color_feature&facet.field=diameter_feature&facet.field=material_feature&facet.field=
...
推荐答案
Solr当前在facet.field参数中不支持通配符.
所以*_feature
对您不起作用.
Solr currently does not support wildcards in the facet.field parameter.
So *_feature
won't work for you.
可能要检查一下- https://issues.apache.org/jira/browse/SOLR-247
如果您不想传递参数,则可以轻松地将其添加到请求处理程序的默认值中.
If you don't want to pass parameters, you can easily add these to your request handler defaults.
请求中的qt=requesthandler
将始终包括这些方面.
The qt=requesthandler
in request would always include these facets.
这篇关于apache solr的方面动态字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!