We are using solr to build an e-commerce application, and we have products getting grouped by subcategory within a parent category. We use dynamic sort order to determine where the product belongs within a subcategory and the same product can appear in more than one subcategory. We are tracking the sort order using dynamic field and each product have multiple sort orders depending on how many subcategory it belongs to. We need to group these products into subcategory and sort it using appropriate sort order. An example below, any help would be greatly appreciated and we are trying to accomplish it using single query.
Products have following sort order
Expected result considering the sort order ascending under each group
We want solr to sort each individual group with its sort order - group.query={subcategory:Bootcut}&group.sort=bootcutSortOrder asc&group.query={subcategory:Skinny}&group.sort=skinnySortOrder asc
What solr does is that it sorts on combination of bootCutSortOrder asc, skinnySortOrder asc.
Is it possible in solr to sort the each section of the group with its own sort order?
we are using latest version of solr and are fine with solr 4 as well.
If I understood your explanation correctly, I think your are looking for Faceted Search.
Fortunately, Lucene & Solr support it. You may refer to the following..
Solr Faceted Search
Lucene Faceted Search
Another on Lucene Faceted Search
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With