apache / apache/lucene

DrillDownQuery should rewrite to FilteredQuery? [LUCENE-4803]

Open
#5,868 5 comments 0 reactions 0 assignees View on GitHub
legacy-jira-fix-version:4.9 legacy-jira-fix-version:6.0 legacy-jira-priority:Major type:bug
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

Today we rewrite to a query like +baseQuery +ConstantScoreQuery(boost=0.0 TermQuery(drillDownTerm)), but I'm not certain 0.0 boost is safe / doesn't actually change scores.

We should also add a test to assert that scores are not changed by drill down.

---
Migrated from [LUCENE-4803](https://issues.apache.org/jira/browse/LUCENE-4803) by Michael McCandless (@mikemccand), updated May 09 2016

Contributor guide

Open the contributing guide

Research direction

Start by locating DrillDownQuery's rewrite logic and the existing tests around it. Compare the current ConstantScoreQuery(boost=0.0) behavior with the proposed FilteredQuery approach, then add a test that verifies drill-down does not change scores. Done means the score-preservation behavior is covered by a passing test.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.