Solr terms component over multiple fields?
I am able to receive the most frequently used terms in my index via the terms compontent described here:
http://wiki.apache.org/solr/TermsComponent
However this only seems to work for exactly one field. I would really like to have this functionality over several fields.
I am aware that I can use an extra field that I fill with all the data when indexing, but I would like to leverage this redundancy if possible.
Is there a possibility to use开发者_如何学C the termscomponent over several fields?
Is there a possibility to use the termscomponent over several fields?
No, the current implementation of TermsComponent takes only a single field, as noted in the documentation.
Perhaps it would be interesting to implement this, accepting multiple comma-separated fields in terms.fl
, then setting per-field parameters as with faceting, e.g. terms.<field>.limit
I'm not familiar enough with the implementation to say if this is possible or really desirable, I'd try asking about it on the solr-dev list.
If this is about implementing suggestions / autocomplete, take a look at the Suggester component instead.
You can add extra terms.fl=fieldName parameters. Just like for the facet.field parameter.
I hope this helps
精彩评论