Filtering docs on boolean value

I've been trying to get these types of queries working for a while,
but no luck. I'm trying to filter documents based on a boolean value
(basically only show documents where show == true).

Here's my query:

Documents are being matched where show == false. Any ideas why this
would happen even though I explicitly say to filter them out?

This should work. Can you post a recreation (no need for the custom score
query you use, just use match_all). See Elasticsearch Platform — Find real-time answers at scale | Elastic

On Sun, Sep 11, 2011 at 4:55 AM, Chris
christopherdavidolivares@gmail.comwrote:

I've been trying to get these types of queries working for a while,
but no luck. I'm trying to filter documents based on a boolean value
(basically only show documents where show == true).

Here's my query:

1158523’s gists · GitHub

Documents are being matched where show == false. Any ideas why this
would happen even though I explicitly say to filter them out?

I can't seem to reproduce the error with curl recreations. When I run
the query against my dataset, there are a lot of offending documents.
However, when I created a new index with the data of a few of the
offending documents, everything works great. The documents that
wrongly match the query in my original dataset are correctly filtered
when I create the new index (even though I only indexed 3 documents to
test). I'm completely stumped. I have around 600 indexed documents
(each one around 20kB, and am running elasticsearch on 64Mb of memory,
far below the recommended standard configuration. Could malformed
data in a few of my documents cause the query to not match? Could
running on 64Mb of memory be the issue?

On Sep 11, 3:49 am, Shay Banon kim...@gmail.com wrote:

This should work. Can you post a recreation (no need for the custom score
query you use, just use match_all). Seehttp://www.elasticsearch.org/help

On Sun, Sep 11, 2011 at 4:55 AM, Chris
christopherdavidoliva...@gmail.comwrote:

I've been trying to get these types of queries working for a while,
but no luck. I'm trying to filter documents based on a boolean value
(basically only show documents where show == true).

Here's my query:

1158523’s gists · GitHub

Documents are being matched where show == false. Any ideas why this
would happen even though I explicitly say to filter them out?

Finally able to reproduce the error.

On Sep 11, 2:18 pm, Chris christopherdavidoliva...@gmail.com wrote:

I can't seem to reproduce the error with curl recreations. When I run
the query against my dataset, there are a lot of offending documents.
However, when I created a new index with the data of a few of the
offending documents, everything works great. The documents that
wrongly match the query in my original dataset are correctly filtered
when I create the new index (even though I only indexed 3 documents to
test). I'm completely stumped. I have around 600 indexed documents
(each one around 20kB, and am running elasticsearch on 64Mb of memory,
far below the recommended standard configuration. Could malformed
data in a few of my documents cause the query to not match? Could
running on 64Mb of memory be the issue?

On Sep 11, 3:49 am, Shay Banon kim...@gmail.com wrote:

This should work. Can you post a recreation (no need for the custom score
query you use, just use match_all). Seehttp://www.elasticsearch.org/help

On Sun, Sep 11, 2011 at 4:55 AM, Chris
christopherdavidoliva...@gmail.comwrote:

I've been trying to get these types of queries working for a while,
but no luck. I'm trying to filter documents based on a boolean value
(basically only show documents where show == true).

Here's my query:

1158523’s gists · GitHub

Documents are being matched where show == false. Any ideas why this
would happen even though I explicitly say to filter them out?

One more thing, the filter works properly when I index the data
without setting "reviews" to type "nested".

On Sep 11, 7:09 pm, Chris christopherdavidoliva...@gmail.com wrote:

Finally able to reproduce the error.

gist:1210453 · GitHub

On Sep 11, 2:18 pm, Chris christopherdavidoliva...@gmail.com wrote:

I can't seem to reproduce the error with curl recreations. When I run
the query against my dataset, there are a lot of offending documents.
However, when I created a new index with the data of a few of the
offending documents, everything works great. The documents that
wrongly match the query in my original dataset are correctly filtered
when I create the new index (even though I only indexed 3 documents to
test). I'm completely stumped. I have around 600 indexed documents
(each one around 20kB, and am running elasticsearch on 64Mb of memory,
far below the recommended standard configuration. Could malformed
data in a few of my documents cause the query to not match? Could
running on 64Mb of memory be the issue?

On Sep 11, 3:49 am, Shay Banon kim...@gmail.com wrote:

This should work. Can you post a recreation (no need for the custom score
query you use, just use match_all). Seehttp://www.elasticsearch.org/help

On Sun, Sep 11, 2011 at 4:55 AM, Chris
christopherdavidoliva...@gmail.comwrote:

I've been trying to get these types of queries working for a while,
but no luck. I'm trying to filter documents based on a boolean value
(basically only show documents where show == true).

Here's my query:

1158523’s gists · GitHub

Documents are being matched where show == false. Any ideas why this
would happen even though I explicitly say to filter them out?

Hi,

Thanks for the recreation!. Found the problem (a tricky one to track...),
opened an issue: Nested Mapping: Nested object with a null value causes wrong indexing structure (resulting in wrong search responses) · Issue #1323 · elastic/elasticsearch · GitHub.
Fixed in 0.17 branch and master. 0.17.7 will be released in a day or two,
once Lucene 3.4.0 is out.

-shay.banon

On Mon, Sep 12, 2011 at 5:30 AM, Chris
christopherdavidolivares@gmail.comwrote:

One more thing, the filter works properly when I index the data
without setting "reviews" to type "nested".

On Sep 11, 7:09 pm, Chris christopherdavidoliva...@gmail.com wrote:

Finally able to reproduce the error.

gist:1210453 · GitHub

On Sep 11, 2:18 pm, Chris christopherdavidoliva...@gmail.com wrote:

I can't seem to reproduce the error with curl recreations. When I run
the query against my dataset, there are a lot of offending documents.
However, when I created a new index with the data of a few of the
offending documents, everything works great. The documents that
wrongly match the query in my original dataset are correctly filtered
when I create the new index (even though I only indexed 3 documents to
test). I'm completely stumped. I have around 600 indexed documents
(each one around 20kB, and am running elasticsearch on 64Mb of memory,
far below the recommended standard configuration. Could malformed
data in a few of my documents cause the query to not match? Could
running on 64Mb of memory be the issue?

On Sep 11, 3:49 am, Shay Banon kim...@gmail.com wrote:

This should work. Can you post a recreation (no need for the custom
score
query you use, just use match_all). Seehttp://
Elasticsearch Platform — Find real-time answers at scale | Elastic

On Sun, Sep 11, 2011 at 4:55 AM, Chris
christopherdavidoliva...@gmail.comwrote:

I've been trying to get these types of queries working for a while,
but no luck. I'm trying to filter documents based on a boolean
value
(basically only show documents where show == true).

Here's my query:

1158523’s gists · GitHub

Documents are being matched where show == false. Any ideas why
this
would happen even though I explicitly say to filter them out?