apache / apache/lucene

Support getting counts from "association" facets [LUCENE-10246]

Open
#11,282 6 comments 0 reactions 0 assignees View on GitHub
legacy-jira-priority:Minor module:facet type:enhancement
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

We have these nice "association" facet implementations today that aggregate "weights" from the docs that facet over, but they don't keep track of counts. So the user can get "top-n" values for a dim by aggregated weight (great!), but can't know how many docs matched each value. It would be nice to support this so users could show the top-n values but _also_ show counts associated with each.

---
Migrated from [LUCENE-10246](https://issues.apache.org/jira/browse/LUCENE-10246) by Greg Miller (@gsmiller), updated Jul 01 2022

Contributor guide

Open the contributing guide

Research direction

Start by locating Lucene's existing association facet implementations and the tests covering their aggregated weights. Trace how top-n values are produced, then determine where per-value document counts would belong. Done means users can retrieve both aggregated weights and counts for association facet values, with tests covering the new behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
search
Issue type
Feature
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.