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

Filter for particular field to exist #1247

Closed
the100rabh opened this issue May 21, 2014 · 6 comments
Closed

Filter for particular field to exist #1247

the100rabh opened this issue May 21, 2014 · 6 comments

Comments

@the100rabh
Copy link

@the100rabh the100rabh commented May 21, 2014

I am currently unable to figure out a way to make use of exists filter in kibana. eg.

{
    "constant_score" : {
        "filter" : {
            "exists" : { "field" : "user" }
        }
    }
}

I wish it was able to filter in kibana using this method.

@rashidkpc
Copy link
Contributor

@rashidkpc rashidkpc commented May 21, 2014

There is an extension to the lucene query language for this:

_exists_:user

There is also:

_missing_:user
@rashidkpc rashidkpc closed this May 21, 2014
@grvm20
Copy link

@grvm20 grvm20 commented Oct 13, 2014

Hi
How can i make this work for a field which is an array? it doesn't seem to work for me if field is an array

Regards

@webmstr
Copy link

@webmstr webmstr commented Sep 3, 2015

The solution is for a query; how about as a filter?

@plu83
Copy link

@plu83 plu83 commented Jan 5, 2017

I realize I'm responding to a comment from 2015, but better late than never.

You could make a Kibana filter consisting of a Lucene query string like so:

{
  "query": {
    "query_string": {
      "query": "_exists_:user"
    }
  }
}
@aneelkkhatri
Copy link

@aneelkkhatri aneelkkhatri commented Mar 31, 2017

@rashidkpc Where can I find the reference guide for this extension to the lucene query language?

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
8 participants
@the100rabh @rashidkpc @webmstr @aneelkkhatri @grvm20 @Bargs @plu83 and others
You can’t perform that action at this time.