Improve documentation for org.apache.lucene.search Sort class
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
### Description
**Problem**
The documentation for the RELEVANCE sort criteria states: *Represents sorting by computed relevance. Using this sort criteria returns the same results as calling [[Searcher#search()](https://lucene.apache.org/core/3_0_3/api/core/org/apache/lucene/search/Searcher.html#search(org.apache.lucene.search.Query,%20int))](https://lucene.apache.org/core/3_0_3/api/core/org/apache/lucene/search/Searcher.html#search(org.apache.lucene.search.Query,%20int))without a sort criteria, only with slightly more overhead.*
However, the documentation doesn't explain how relevance is computed or what parameters influence this calculation.
This is the link to the docs:
https://lucene.apache.org/core/3_0_3/api/core/org/apache/lucene/search/Sort.html
**Desired solution**
A clear explanation of how the relevance-based sorting mechanism works, including the key parameters that determine result ordering.
**More detail**
I discovered this documentation gap while investigating the "relevance" sorting criteria in the arXiv API, which searches a database of preprint academic articles. While I learned that the system uses the Lucene class for sorting, there's no clear explanation of how this class actually works. You can find the issue here:
https://github.com/arXiv/arxiv-docs/issues/1099
Contributor guide
Research direction
Start with the org.apache.lucene.search.Sort Javadoc linked in the issue, especially the RELEVANCE sort criteria description. Research the relevance calculation and the parameters that influence result ordering, then update that documentation with a clear explanation and verify that it accurately reflects the linked Lucene search behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- documentation, search
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100