The goal you are describing doesn't really sound at all like faceting -- it sounds like what you want might be "grouping" (or collapse/expand) ... OR: depending on how you index your data perhaps what you really want is "nested documents" ... or maybe maybe if youre usecase is simple enough just using the "subquery" DocTransformer w/o needing explicit relationships between the docs at indexing time.
I would suggest you read the docs on each of these features and see what sounds best to you... https://lucene.apache.org/solr/guide/8_5/result-grouping.html https://lucene.apache.org/solr/guide/8_5/collapse-and-expand-results.html https://lucene.apache.org/solr/guide/8_5/indexing-nested-documents.html https://lucene.apache.org/solr/guide/8_5/searching-nested-documents.html https://lucene.apache.org/solr/guide/8_5/transforming-result-documents.html#child-childdoctransformerfactory https://lucene.apache.org/solr/guide/8_5/transforming-result-documents.html#subquery : Date: Mon, 20 Apr 2020 04:37:06 -0700 (MST) : From: Venu <thotavenumadhav...@gmail.com> : Reply-To: solr-user@lucene.apache.org : To: solr-user@lucene.apache.org : Subject: Re: Solr facet order same as result set : : Probably I haven't framed my question properly. : : Consider the schema with the fields - id, sku, fc_id, group_id : The same SKU can be part of multiple documents with different fc_id and : group_id. : : For a given search query, multiple documents having the same SKU will be : returned. Is there any way I can get all the fc_ids for those SKUs returned : in the result set? Do I have to do a separate query with those SKUs again to : fetch the fc_ids through json facets? : : I am fetching the fc_ids through JSON-facets. But the order of those : returned from facets is different from the result set. : : : : -- : Sent from: https://lucene.472066.n3.nabble.com/Solr-User-f472068.html : -Hoss http://www.lucidworks.com/