Field collapsing / Grouping - How to make SOLR return intersection of 2 resultset groups?

StackOverflow https://stackoverflow.com/questions/12202023

  •  29-06-2021
  •  | 
  •  

Question

I have 2 fields for grouping, these 2 field can have different keywords stored in them

Ex:

Field1: CD, book, e-book

Field2: repo1, repo2, repo3, repo4

Now I want to group the combination of CD/repo1 , book/repo2, e-book/repo3,e-book/repo4,CD/repo4 rather than grouping just on field1 seperately and field2 seperately. i.e I need to group based on 2 grouped results (intersection between the grouped results). Is there a way I can make SOLR return group results for all combination?

Thanks. BB

Was it helpful?

Solution

I don't think you can have intersection between grouped results at query time.
The other solution would be create the combination into a field at index time and use the field for grouping which would give you the results.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top