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

Validate query ignores alias filters #6112

Closed
clintongormley opened this issue May 9, 2014 · 2 comments
Closed

Validate query ignores alias filters #6112

clintongormley opened this issue May 9, 2014 · 2 comments

Comments

@clintongormley
Copy link

PUT /foo/t/1
{"foo": "bar"}

PUT /foo/_alias/bar
{
  "filter": {"term": { "foo": "bar"}}
}

GET /foo/_validate/query?explain
{"query": { "match_all": {}}}

Returns:

  {
     "index": "foo",
     "valid": true,
     "explanation": "ConstantScore(*:*)"
  }

It should include the filter from the alias.

@javanna javanna added the v2.0.0 label May 9, 2014
@javanna javanna self-assigned this May 9, 2014
@javanna javanna added v1.2.0 and removed v1.3.0 labels May 9, 2014
javanna added a commit to javanna/elasticsearch that referenced this issue May 12, 2014
Made sure that a match_all query is used when no query is specified and ensure no NPE is thrown either.
Also used the same code path as the search api to ensure that alias filters are taken into account, same for type filters.

Closes elastic#6111 Closes elastic#6112 Closes elastic#6116
javanna added a commit that referenced this issue May 12, 2014
Made sure that a match_all query is used when no query is specified and ensure no NPE is thrown either.
Also used the same code path as the search api to ensure that alias filters are taken into account, same for type filters.

Closes #6111 Closes #6112 Closes #6116
@s1monw
Copy link
Contributor

s1monw commented May 18, 2014

should we get this into 1.1.2 as well?

@javanna
Copy link
Member

javanna commented May 19, 2014

Makes sense to me, will do

javanna added a commit that referenced this issue May 19, 2014
Made sure that a match_all query is used when no query is specified and ensure no NPE is thrown either.
Also used the same code path as the search api to ensure that alias filters are taken into account, same for type filters.

Closes #6111 Closes #6112 Closes #6116
@javanna javanna added the v1.1.2 label May 19, 2014
mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015
Made sure that a match_all query is used when no query is specified and ensure no NPE is thrown either.
Also used the same code path as the search api to ensure that alias filters are taken into account, same for type filters.

Closes elastic#6111 Closes elastic#6112 Closes elastic#6116
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