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

Allow exists filter for unindexed fields #6143

Merged
merged 2 commits into from
Mar 11, 2016

Conversation

jimmyjones2
Copy link
Contributor

As Elasticsearch uses _field_names the exists filter works for fields regardless of if they are indexed or not. However the filter doesn't work for meta fields, so disable it in that case.

Closes #6142

@elasticsearch-release
Copy link

Jenkins standing by to test this. If you aren't a maintainer, you can ignore this comment. Someone with commit access, please review this and clear it for Jenkins to run; then say 'jenkins, test it'.

@epixa
Copy link
Contributor

epixa commented Feb 8, 2016

jenkins, test it

@epixa epixa added the review label Feb 8, 2016
@@ -3,8 +3,8 @@
<h5 ng-show="!field.details.error">Quick Count <kbn-info info="Top 5 values based on documents in the table" placement="right"></kbn-info>
<span ng-if="!field.details.error" class="small discover-field-details-count">
(
<a ng-show="field.indexed" ng-click="updateFilterInQuery('_exists_', field.name, '+')">{{::field.details.exists}}</a>
<span ng-show="!field.indexed">{{::field.details.exists}}</span>
<a ng-show="indexPattern.metaFields.indexOf(field.name) === -1" ng-click="updateFilterInQuery('_exists_', field.name, '+')">{{::field.details.exists}}</a>
Copy link
Contributor

Choose a reason for hiding this comment

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

We have es6 shims in place, so you can do indexPattern.metaFields.includes(field.name)

Copy link
Contributor

Choose a reason for hiding this comment

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

It would also be great if this indented the attributes like so: https://gist.github.com/anonymous/da97415cf745242e2fca

@jimmyjones2
Copy link
Contributor Author

@spalger Thanks for the tips, have done the changes as suggested

@epixa
Copy link
Contributor

epixa commented Feb 9, 2016

jenkins, test it

@epixa
Copy link
Contributor

epixa commented Feb 9, 2016

Some test failures here

@jimmyjones2
Copy link
Contributor Author

@epixa Are these related? Seeing failure in visualize which is nowhere near these changes!

@spalger
Copy link
Contributor

spalger commented Feb 10, 2016

jenkins, test it

@elasticsearch-release
Copy link

Jenkins standing by to test this. If you aren't a maintainer, you can ignore this comment. Someone with commit access, please review this and clear it for Jenkins to run; then say 'jenkins, test it'.

@rashidkpc
Copy link
Contributor

LGMT

rashidkpc pushed a commit that referenced this pull request Mar 11, 2016
Allow exists filter for unindexed fields
@rashidkpc rashidkpc merged commit 6737567 into elastic:master Mar 11, 2016
@epixa epixa added the v5.0.0 label Mar 11, 2016
@jimmyjones2 jimmyjones2 deleted the filter-unindexed branch May 2, 2016 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants