gsmiller opened a new pull request #234:
URL: https://github.com/apache/lucene/pull/234


   
   # Description
   
   Slight improvement to the way duplicate numeric doc values are de-duped when 
facet counting. Main benefit is avoiding the overhead in the `LongCounter` 
segment-tree when encountering duplicate numeric doc values.
   
   NOTE: I'm planning to push this with no tracking Jira issue given how minor 
the change is and the fact that it's functionally equivalent to what's already 
on `main`. I'm using this PR only as a triple-check for the `precommit` tastk 
and slight audit-ability. No CHANGES entry is included as such.
   
   # Solution
   
   Maintain previous value and de-dupe before proceeding with counting. Tweaked 
the impl in `LongValueFacetCounts` to init previous to -1 (instead of 0) so the 
index check isn't needed (since -1 is an invalid value).
   
   # Tests
   
   Tests for these two facet counting implementations already cover duplicate 
value checking. All tests continue to pass.
   
   # Checklist
   
   Please review the following and check all that apply:
   
   - [x] I have reviewed the guidelines for [How to 
Contribute](https://wiki.apache.org/lucene/HowToContribute) and my code 
conforms to the standards described there to the best of my ability.
   - [ ] I have created a Jira issue and added the issue ID to my pull request 
title.
   - [x] I have given Lucene maintainers 
[access](https://help.github.com/en/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork)
 to contribute to my PR branch. (optional but recommended)
   - [x] I have developed this patch against the `main` branch.
   - [x] I have run `./gradlew check`.
   - [ ] I have added tests for my changes.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to