Document doesn't exist but appears in search results

I have a particular document in ES index that does or does not exist,
depending on how I look for it.

If I try getting it:

curl localhost:9200/test/foo/123?pretty=true

It doesn't appear to exist:

{
"_index" : "test",
"_type" : "foo",
"_id" : "123",
"exists" : false
}

If I try searching for it:

curl localhost:9200/test/foo/_search?pretty=true -d '{
"query" : {
"term" : { "_id" : "123" }
}
}'

It's found:

{
"took" : 3,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 1,
"max_score" : 1.0,
"hits" : [ {
"_index" : "test",
"_type" : "foo",
"_id" : "123",
"_score" : 1.0, "_source" : {"bar":"blah blah"}
} ]
}
}

I haven't yet figured out the reproduction steps, but this particular
document seems "stuck" in this weird state. Refreshing doesn't fix it. What
could possibly lead to this situation?

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

This turned out to be a routing issue. The document type was a child of
another type and I was forgetting to specify the parent id for routing of
the get call.

On Thu, Jul 18, 2013 at 3:34 PM, Paul Bellora bellorap@gmail.com wrote:

I have a particular document in ES index that does or does not exist,
depending on how I look for it.

If I try getting it:

curl localhost:9200/test/foo/123?pretty=true

It doesn't appear to exist:

{
"_index" : "test",
"_type" : "foo",
"_id" : "123",
"exists" : false
}

If I try searching for it:

curl localhost:9200/test/foo/_search?pretty=true -d '{
"query" : {
"term" : { "_id" : "123" }
}
}'

It's found:

{
"took" : 3,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 1,
"max_score" : 1.0,
"hits" : [ {
"_index" : "test",
"_type" : "foo",
"_id" : "123",
"_score" : 1.0, "_source" : {"bar":"blah blah"}
} ]
}
}

I haven't yet figured out the reproduction steps, but this particular
document seems "stuck" in this weird state. Refreshing doesn't fix it. What
could possibly lead to this situation?

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/ctv2LZqilSM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Thanks, this sorted an issue I was experiencing, Elasticsearch server was
returning a 500 status (below), when trying to update a document created
with this issue. The error now makes a lot more sense.

{

"status": 500,

"error": "NullPointerException[null]"

}

On Thursday, July 18, 2013 4:19:56 PM UTC-4, Paul Bellora wrote:

This turned out to be a routing issue. The document type was a child of
another type and I was forgetting to specify the parent id for routing of
the get call.

On Thu, Jul 18, 2013 at 3:34 PM, Paul Bellora <bell...@gmail.com<javascript:>

wrote:

I have a particular document in ES index that does or does not exist,
depending on how I look for it.

If I try getting it:

curl localhost:9200/test/foo/123?pretty=true

It doesn't appear to exist:

{
"_index" : "test",
"_type" : "foo",
"_id" : "123",
"exists" : false
}

If I try searching for it:

curl localhost:9200/test/foo/_search?pretty=true -d '{
"query" : {
"term" : { "_id" : "123" }
}
}'

It's found:

{
"took" : 3,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 1,
"max_score" : 1.0,
"hits" : [ {
"_index" : "test",
"_type" : "foo",
"_id" : "123",
"_score" : 1.0, "_source" : {"bar":"blah blah"}
} ]
}
}

I haven't yet figured out the reproduction steps, but this particular
document seems "stuck" in this weird state. Refreshing doesn't fix it. What
could possibly lead to this situation?

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/ctv2LZqilSM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
elasticsearc...@googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.