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

Field alias updates are not reflected in percolator queries. #37212

Open
jtibshirani opened this issue Jan 8, 2019 · 2 comments
Open

Field alias updates are not reflected in percolator queries. #37212

jtibshirani opened this issue Jan 8, 2019 · 2 comments

Comments

@jtibshirani
Copy link
Member

@jtibshirani jtibshirani commented Jan 8, 2019

We currently allow the path of a field alias to be changed through a mapping update. This interacts poorly with percolator queries, as seen in the following gist where changing the path of an alias causes a percolator query to no longer match as expected: https://gist.github.com/jtibshirani/c86b5533b1b4d3ab83fb44280e4817b9. The issue is especially tricky because updating a field alias can update the actual field type (say from keyword to long), which may affect how percolator indexes the query.

This bug raises a larger question: do we want to allow the path of a field alias to change, as is currently implemented?

Relates to #36418, which discusses the possibility of deleting field aliases.

@elasticmachine
Copy link
Collaborator

@elasticmachine elasticmachine commented Jan 8, 2019

@jpountz
Copy link
Contributor

@jpountz jpountz commented Jan 14, 2019

We discussed this issue in the search meeting and agreed to either:

  • find a way to disallow updates on aliases when percolator fields are in use or disallow using alias field in percolator queries if this can be done in a way that is easy to maintain, or
  • document this limitation in the percolator docs otherwise.
@jpountz jpountz added help wanted and removed team-discuss labels Jan 14, 2019
jtibshirani added a commit to jtibshirani/elasticsearch that referenced this issue Mar 14, 2019
Currently if a field alias is updated, any percolator queries that contain the
alias will still refer to its old target. This PR documents the issue while we
look into addressing it.

Relates to elastic#37212.
jtibshirani added a commit to jtibshirani/elasticsearch that referenced this issue Mar 14, 2019
Currently if a field alias is updated, any percolator queries that contain the
alias will still refer to its old target. This PR documents the issue while we
look into addressing it.

Relates to elastic#37212.
jtibshirani added a commit that referenced this issue Mar 15, 2019
Currently if a field alias is updated, any percolator queries that contain the
alias will still refer to its old target. This PR documents the issue while we
look into addressing it.

Relates to #37212.
jtibshirani added a commit that referenced this issue Mar 15, 2019
Currently if a field alias is updated, any percolator queries that contain the
alias will still refer to its old target. This PR documents the issue while we
look into addressing it.

Relates to #37212.
jtibshirani added a commit that referenced this issue Mar 15, 2019
Currently if a field alias is updated, any percolator queries that contain the
alias will still refer to its old target. This PR documents the issue while we
look into addressing it.

Relates to #37212.
jtibshirani added a commit that referenced this issue Mar 15, 2019
Currently if a field alias is updated, any percolator queries that contain the
alias will still refer to its old target. This PR documents the issue while we
look into addressing it.

Relates to #37212.
jtibshirani added a commit that referenced this issue Mar 15, 2019
Currently if a field alias is updated, any percolator queries that contain the
alias will still refer to its old target. This PR documents the issue while we
look into addressing it.

Relates to #37212.
@rjernst rjernst added the Team:Search label May 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.