Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Feature not supported on fieldref modifier #64

Merged
merged 1 commit into from
Jun 21, 2024
Merged

Conversation

andurin
Copy link
Collaborator

@andurin andurin commented Jun 21, 2024

As @defensivedepth recognized there is an upcoming modifier called "fieldref" which aims to use a field reference for comparision.

As far as I know:

  • EQL: Can't handle fieldreferences.
  • Lucene: May can handle fieldreference while using scripted queries. This isn't implemented yet and also not planned yet.

FTR - it could be something like this:

{
  "query": {
    "bool": {
      "must": [
        {
          "script": {
            "script": {
              "source": "doc['field1'].value > doc['field2'].value"
            }
          }
        }
      ]
    }
  }
}

But this may be a expensive search since the script will be applied to each document within the index.

@andurin andurin merged commit 763f07a into main Jun 21, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant