apache / apache/lucene

Nested Field Collapsing [LUCENE-3257]

Open
#4,330 0 comments 0 reactions 0 assignees View on GitHub
legacy-jira-priority:Major module:grouping type:enhancement
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

Currently specifying grouping on multiple fields returns multiple datasets.

It would be nice if Solr supported cascading / nested grouping by applying the first group over the entire result set, the next over each group and so forth and so forth.

Even if limited to supporting nesting grouping 2 levels deep would cover alot of use cases.

group.field=location&group.field=type

-Location X
---Type 1
-----documents
---Type 2
----documents
-Location Y
---Type 1
----documents
---Type 2
----documents

instead of
-Location X
- documents
-Location Y
--documents

-Type 1
--documents
-Type2
--documents

See also https://issues.apache.org/jira/browse/SOLR-2553

---
Migrated from [LUCENE-3257](https://issues.apache.org/jira/browse/LUCENE-3257) by Martijn Laarman, 6 votes

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the existing grouping behavior for repeated group.field parameters and the related SOLR-2553 issue. Define how the first group should contain nested results for each subsequent group, including the supported nesting depth and expected response structure; completion would require the documented behavior and coverage for the example hierarchy.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
search
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.