Add a top-n range faceting example to RangeFacetsExample [LUCENE-10652]
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
In #11650, we modified the behavior of getTopChildren to actually return top-n ranges ordered by count. The original behavior of getTopChildren in RangeFacetsCounts was to return all ranges ordered by constructor-specified range order, and this behavior is now retained in the getAllChildren API (#11586).
Therefore, it would be helpful to add an example in RangeFacetsExample to demo this change. I replaced the original example of getTopChildren with getAllChildren, and will add an example of the current getTopChildren API soon.
---
Migrated from [LUCENE-10652](https://issues.apache.org/jira/browse/LUCENE-10652) by Yuting Gan (@Yuti-G), updated Jul 18 2022
Pull requests: https://github.com/apache/lucene/pull/1035
Contributor guide
Research direction
Start in RangeFacetsExample and compare the existing getAllChildren example with the getTopChildren API described in the issue. Add an example showing top-n ranges ordered by count, and confirm the example clearly demonstrates the changed behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- search
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100