How can i filter out documents with missing field value


(Weiwei Wang) #1

i have lots of document to index, and some of them has no value for
field "author", when search i want to be able to filter out those
documents without value for field "author"

how can i achieve it?

i tryied querystring AND author:*, but it runs very slow


(St├ęphane Raux) #2

Did you try the "exists" filter ?
http://www.elasticsearch.org/guide/reference/query-dsl/exists-filter.html

Conversely, there is also a "missing" filter.

2011/6/1 Weiwei Wang ww.wang.cs@gmail.com:

i have lots of document to index, and some of them has no value for
field "author", when search i want to be able to filter out those
documents without value for field "author"

how can i achieve it?

i tryied querystring AND author:*, but it runs very slow


(Weiwei Wang) #3

thanks, i found exist is supported by query_string

On Jun 1, 11:03 pm, St├ęphane Raux stephane.r...@gmail.com wrote:

Did you try the "exists" filter ?http://www.elasticsearch.org/guide/reference/query-dsl/exists-filter....

Conversely, there is also a "missing" filter.

2011/6/1 Weiwei Wang ww.wang...@gmail.com:

i have lots of document to index, and some of them has no value for
field "author", when search i want to be able to filter out those
documents without value for field "author"

how can i achieve it?

i tryied querystring AND author:*, but it runs very slow


(system) #4