Skip to content

[BUG] Removing rewrite for derived fields #19337

@harshavamsi

Description

@harshavamsi

Describe the bug

In #19296, i commented out the rewrite for derived fields. Rewriting certain queries that are wrapped in the derived field type now have issues at the lucene layer. Range queries in lucene now check pointvalues at rewrite time and since derived fields are not indexed, the rewrite returns a MatchNoDocsQuery which is incorrect.

We need to figure out a more concrete rewriting pattern for derived fields. Using this issue to track discussions.

Related component

Search

To Reproduce

Running a rewrite on a derived field causes issues while doing range queries

Expected behavior

Figure out new ways to rewrite derived field queries

Additional Details

Plugins
Please list all plugins currently enabled.

Screenshots
If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Metadata

Metadata

Labels

SearchSearch query, autocomplete ...etcbugSomething isn't workinglucenev3.3.0

Type

No type

Projects

Status

✅ Done

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions