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

Existence queries unable to match nested object fields #5560

Open
esatterwhite opened this issue Nov 22, 2024 · 2 comments · May be fixed by #5581
Open

Existence queries unable to match nested object fields #5560

esatterwhite opened this issue Nov 22, 2024 · 2 comments · May be fixed by #5581
Assignees

Comments

@esatterwhite
Copy link
Collaborator

Describe the bug
The field existence query doesn't work on nested field unless the field is terminal

Steps to reproduce (if applicable)

Indexing a document like the following

{
  "foo": {
    "bar": 1
  }
, "whiz": true
}

No Matches

foo:*

Matches

foo:bar:*

Matches

whiz:*

Expected behavior
I would expect a document with a field of foo to match when using the existence query even if the field value is an object. That is the behavior seen by elasticsearch nested fields.

Version Information

{
  "build": {
    "build_date": "2024-10-29T15:18:16Z",
    "build_profile": "release",
    "build_target": "aarch64-unknown-linux-gnu",
    "cargo_pkg_version": "0.8.0",
    "commit_date": "2024-10-29T11:50:14Z",
    "commit_hash": "826f10f0d7ba1a448795890fe296941b84872c57",
    "commit_short_hash": "826f10f",
    "commit_tags": [
      "qw-airmail-20241029"
    ],
    "version": "0.8.0-nightly"
  },
  "runtime": {
    "num_cpus": 16,
    "num_threads_blocking": 14,
    "num_threads_non_blocking": 2
  }
}
@esatterwhite esatterwhite added the bug Something isn't working label Nov 22, 2024
@fulmicoton fulmicoton self-assigned this Nov 25, 2024
@fulmicoton fulmicoton added high-priority and removed bug Something isn't working labels Nov 25, 2024
@rdettai rdettai assigned rdettai and unassigned fulmicoton Dec 5, 2024
@fulmicoton
Copy link
Contributor

@rdettai have you checked that it was working as described in elasticsearch? My understanding is that your plan si to implement in both

  • fast field
  • indexed field,
    correct?

@rdettai
Copy link
Contributor

rdettai commented Dec 11, 2024

have you checked that it was working as described in elasticsearch?

yes (see test)

My understanding is that your plan si to implement in both fast field / indexed field

Definitively for fast fields as it can be done without changing the indexing side. For indexed fields, I am still looking for a way to do it without indexing intermediate paths but I doubt it will be possible. Ideally, I think it should also be implemented for object types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants