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

Index field names of documents. #6269

Closed
wants to merge 2 commits into from

Conversation

jpountz
Copy link
Contributor

@jpountz jpountz commented May 21, 2014

The exists and missing filters need to merge postings lists of all existing
terms, which can be very costly, especially on high-cardinality fields. This
commit indexes the field names of a document under _field_names and uses it
to speed up the exists and missing filters.

This is only enabled for indices that are created on or after Elasticsearch
1.3.0.

Close #5659

The `exists` and `missing` filters need to merge postings lists of all existing
terms, which can be very costly, especially on high-cardinality fields. This
commit indexes the field names of a document under `_field_names` and reuses it
to speed up the `exists` and `missing` filters.

This is only enabled for indices that are created on or after Elasticsearch
1.3.0.

Close elastic#5659
@jpountz jpountz added the review label May 22, 2014
/**
* Return the {@link Version} of Elasticsearch that has been used to create an index given its settings.
*/
public static Version indexCreated(Settings indexSettings) {
Copy link
Contributor

Choose a reason for hiding this comment

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

oh good! thanks for adding this! I didn't look further down but maybe we can have some basic tests that is does what we expect it to do?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@s1monw
Copy link
Contributor

s1monw commented Jun 6, 2014

I left some comments this will be a nice improvement!

@s1monw s1monw removed the review label Jun 6, 2014
@jpountz
Copy link
Contributor Author

jpountz commented Jun 13, 2014

@s1monw I just pushed a new commit and replied to your comments.

@jpountz jpountz added the review label Jun 13, 2014
@s1monw
Copy link
Contributor

s1monw commented Jun 18, 2014

left one comment other than that LGTM

@s1monw s1monw removed the review label Jun 18, 2014
@jpountz
Copy link
Contributor Author

jpountz commented Jun 18, 2014

I'll fix the test. Thanks!

@jpountz jpountz closed this Jun 19, 2014
@jpountz jpountz deleted the fix/field_names branch June 19, 2014 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Speed up exists and missing filters on high-cardinality fields
2 participants