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

Comments

Projects
None yet
7 participants
@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

This comment has been minimized.

Show comment
Hide comment
@rashidkpc

rashidkpc May 21, 2014

Member

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

_exists_:user

There is also:

_missing_:user
Member

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

This comment has been minimized.

Show comment
Hide comment
@grvm20

grvm20 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

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

This comment has been minimized.

Show comment
Hide comment
@webmstr

webmstr Sep 3, 2015

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

webmstr commented Sep 3, 2015

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

@plu83

This comment has been minimized.

Show comment
Hide comment
@plu83

plu83 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"
    }
  }
}

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

This comment has been minimized.

Show comment
Hide comment
@aneelkkhatri

aneelkkhatri Mar 31, 2017

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

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