apache / apache/lucene

Query Metadata Aggregator [LUCENE-8919]

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

Description

It would be good if there was a mechanism to allow aggregation of metadata for queries (eg, number of clauses, types of clauses, terms involved etc). This is particularly useful for complex queries with multiple levels of nesting and a high degree of branching. This should help debug query performance issues and draw patterns in case a query is misbehaving. With the QueryVisitor being present, this should be doable.

---
Migrated from [LUCENE-8919](https://issues.apache.org/jira/browse/LUCENE-8919) by Atri Sharma (@atris)

Contributor guide

Open the contributing guide

Research direction

Start by reading the existing QueryVisitor API and the query traversal it supports. Define how query metadata such as clause counts, clause types, and involved terms should be aggregated, including nested and branching queries; done means a usable mechanism exists to inspect those patterns for performance debugging.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
search
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.