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

Flat object field use IndexOrDocValuesQuery to optimize query #14383

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kkewwei
Copy link
Contributor

@kkewwei kkewwei commented Jun 16, 2024

Description

The pr mainly support the two features:
1.flat object field use IndexOrDocValuesQuery to optimize query.
2.flat object field delegate to keyword field to reduce code duplication.

Related Issues

Resolves #11635 #11537

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Copy link
Contributor

❌ Gradle check result for 9da1d18: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@kkewwei
Copy link
Contributor Author

kkewwei commented Jun 17, 2024

After #13853 is merged, the pr can be merged later.

Copy link
Contributor

❌ Gradle check result for 48b7f47: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@harshavamsi
Copy link
Contributor

@kkewwei looks like a bunch of flat_object tests are failing. I can review once we have green gradle!

Copy link
Contributor

❌ Gradle check result for e53defb: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

❌ Gradle check result for e9fe867: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

❌ Gradle check result for 428c93e: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@msfroh
Copy link
Collaborator

msfroh commented Sep 19, 2024

In the #13853, I'm plan to add parameter:depth_limit, which allow to set maximum depth limitation to the JSON document, I'm not sure whether it can meet the requirements?

I'm more concerned about the number of tokens produced by value side of things.

Suppose we have a dot-path like the following:

"flat.my.dot.value": "Here is some text"

If we want to support full-text search on that field, using StandardAnalyzer, I think we would translate {"term":{"flat.my.dot.value":"some"}} into essentially {"term":{"flat._valueAndPath":"flat.my.dot.value=some"}}, which is what we already do.

For that to work, at indexing time, we would run the analyzer on the value, and write the following tokens to flat._valueAndPath:

my.dot.value=here
my.dot.value=is
my.dot.value=some
my.dot.value=text

Essentially, every token for every path needs to be added. It can work (and it definitely did work when I did it 11 years ago), but we might need to be careful.

Anyway, I'll write up a proposal for adding analyzer support to flat object fields. I can dig up some details from that old project.

Also, thanks for bringing up #13853! I'll take a look at that one soon!

Copy link
Contributor

❌ Gradle check result for c04f6be: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

❌ Gradle check result for 2840b3a: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

✅ Gradle check result for 88ca24f: SUCCESS

Copy link
Contributor

❌ Gradle check result for 3d1ed2a: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

❌ Gradle check result for 88ca24f: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

❌ Gradle check result for 6825b2e: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

❌ Gradle check result for 74e096a: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

❕ Gradle check result for d9046ad: UNSTABLE

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch bug Something isn't working Search:Query Capabilities v2.16.0 Issues and PRs related to version 2.16.0 v2.17.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Flat object field should delegate to keyword field for most query types
4 participants