apache / apache/lucene

Use Kahan summation for float aggregations to reduce errors

Open
#13,011 3 comments 0 reactions 0 assignees View on GitHub
type:task
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

### Description

With facet associations, we have the option of summing floats into an accumulator. This type of operation is prone to errors, which can be prevented by using summation algorithms specifically designed for floats, such as Kahan summation.

Contributor guide

Open the contributing guide

Research direction

Start by locating the facet-association code that sums floats into an accumulator. Read the existing aggregation path and determine where Kahan summation should replace ordinary float addition. Done means float aggregations use the specified summation approach and the associated numerical error is reduced.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
search
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.