Asha Koshti
Asha Koshti

Reputation: 2993

Grouping not working in solr

I have installed and configured solr 3.6.0 with tomcat container. I have created the index of solr example docs. I want to apply grouping functionality on that. I have applied grouping query according to below document: http://wiki.apache.org/solr/FieldCollapsing and I don't see the field collapsing. I mean I see the results, but not the grouping. My understanding is it should work. I have chaged below line in solrconfig.xml.

<searchComponent name="query" class="org.apache.solr.handler.component.CollapseComponent" />

in my solr home, all the fields are indexed and stored.

I don't see what I'm doing wrong.

Upvotes: 1

Views: 1324

Answers (1)

Peter Dixon-Moses
Peter Dixon-Moses

Reputation: 3209

You don't need to include a searchComponent in your solrconfig.xml. If you're using 3.6, the grouping functionality you need is included standard.

Simply:

  • Remove the line you added to solrconfig.xml and restart Solr.
  • Run your query with the additional parameters group=true&group.field=group_field

(make sure the group_field you're using is indexed in your schema)

Upvotes: 2

Related Questions