Small fix in CustomScoreQuery JavaDoc [LUCENE-1650]
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
I have fixed the javadoc for "Modified Score" formular in CustomScoreQuery. - Patch attached: customScoreQuery_JavaDoc.patch
I'm quite curious why the method:
public float customScore(int doc, float subQueryScore, float valSrcScores[])
calls public float customScore(int doc, float subQueryScore, float valSrcScore]) only in 2 of the 3 cases which makes the choice to override either one of the customScore methods dependent on the number of ValueSourceQuery passed to the constructor. I figure it would be more consistent if it would call the latter in all 3 cases.
I also attached a patch which proposes a fix for that issue. The patch does also include the JavaDoc issue mentioned above.
- customScoreQuery_CodeChange+JavaDoc.patch
---
Migrated from [LUCENE-1650](https://issues.apache.org/jira/browse/LUCENE-1650) by Simon Willnauer (@s1monw), updated May 09 2016
Attachments: [customScoreQuery_CodeChange+JavaDoc.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-1650/customScoreQuery_CodeChange%2BJavaDoc.patch), [customScoreQuery_JavaDoc.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-1650/customScoreQuery_JavaDoc.patch), [LUCENE-1650.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-1650/LUCENE-1650.patch) (versions: 2)
Contributor guide
Research direction
Start by reading the CustomScoreQuery class and comparing the attached customScoreQuery_JavaDoc.patch and customScoreQuery_CodeChange+JavaDoc.patch. Check the three cases of customScore(int, float, float[]) and the single-value overload; done means the JavaDoc describes Modified Score correctly and the overload behavior is consistent in all three cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- search
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100