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

Special case the _index field in queries #12027

Closed
wants to merge 1 commit into from
Closed

Special case the _index field in queries #12027

wants to merge 1 commit into from

Conversation

markharwood
Copy link
Contributor

This change allows queries to test the name of the index by referring to the _index field in query clauses. Adding this capability means we can deprecate the specialist indices query.

IndexFieldMapper is changed to make the term(s) query factory methods instead produce match_all or match_none queries based on tests of the index name.

Closes #3316

…allows queries to test the name of the index. Adding this capability means we can deprecate the specialist indices query.

IndexFieldMapper is changed to make the term query factories produce match_all or match_none queries based on tests on the index name.

Closes #3316
@markharwood markharwood added v2.0.0-beta1 review :Search/Search Search-related issues that do not fall into other categories labels Jul 3, 2015
@clintongormley clintongormley added :Query DSL and removed :Search/Search Search-related issues that do not fall into other categories labels Jul 5, 2015
@clintongormley clintongormley changed the title Search enhancement: adds a special case for the “_index” field Special case the _index field in queries Jul 5, 2015
@jpountz
Copy link
Contributor

jpountz commented Jul 5, 2015

LGTM!

@markharwood
Copy link
Contributor Author

Pushed to master f95981b


/**
* This termQuery impl looks at the context to determine the index that
* is being queried and then returns a MATCH_ALL_QUERY or MATCH_NO_QUERY
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MATCH_NO_DOCS_QUERY?

@jpountz
Copy link
Contributor

jpountz commented Jul 7, 2015

@markharwood Should it be closed since it was pushed?

@markharwood markharwood closed this Jul 8, 2015
@kevinkluge kevinkluge removed the review label Jul 8, 2015
rjernst added a commit to rjernst/elasticsearch that referenced this pull request Jul 21, 2015
The `_index` field is now a completely virtual field thanks
to elastic#12027. It is no longer necessary to index the actual value
of the index name.

closes elastic#12329
@clintongormley clintongormley added :Search/Search Search-related issues that do not fall into other categories and removed :Query DSL labels Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement :Search/Search Search-related issues that do not fall into other categories v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants