Flips
Flips

Reputation: 170

Is there any way to convert a solr multifield value to single field for sort?

I have records that have multiple values so I put those fields in a multifield value for its solr document. The issue is I also need to return an ordered list of these values. I have way to many records to pull all document values and sort myself. I tried to create separate solr documents to store just these values with needed information but managing this has become a nightmare. Attempting to keep comments low and managing memory has not been ideal for this solution.

Is there anyway to copy these multifield values into single field values for the same document and sort on these multiple single field values in solr?

Thanks for any help.

Upvotes: 0

Views: 734

Answers (1)

Samuele Mattiuzzo
Samuele Mattiuzzo

Reputation: 11048

doesn't faceting help you? you won't need to have a copyfield for multivalued/non-multivalued, just store them in a multivalued field, facet them and set the sorting criteria for the facet (default: number of occurrencies for each value)

Upvotes: 1

Related Questions