ElasticSearchException: document missing

I'm getting strange exception. I'm getting it when running MLT query.
But the reason is actualy not related to MLT.
If I run search like

http://localhost:9200/myind/post/5b92f025-3f7b-4429-8535-9a20efd55d8f

I'm getting:

{"_index":"myind","_type":"post","_id":"5b92f025-3f7b-4429-8535-9a20efd55d8f","exists":false}

As if there is no document with such ID.
But, if I run:

http://localhost:9200/myind/_search?q=postId:5b92f025-3f7b-4429-8535-9a20efd55d8f

I'm actually getting a document with such ID:

{"took":1,"timed_out":false,"_shards":{"total":5,"successful":
5,"failed":0},"hits":{"total":1,"max_score":9.77106,"hits":
[{"_index":"myind","_type":"post","_id":"5b92f025-3f7b-4429-8535-9a20efd55d8f","_score":
9.77106, "_source" :
{"postId":"5b92f025-3f7b-4429-8535-9a20efd55d8f","description":.............
the rest is truncated

What could be the problem? Why I'm not getting the document from the
first query?

Thanks in advance,
Eugene S.

Are you using routing or parent mapping where post is a child mapping
(which uses routing)? If so, you need to provide the routing value when
doing a GET.

On Mon, Nov 28, 2011 at 4:18 AM, Eugene Strokin eugene@strokin.info wrote:

I'm getting strange exception. I'm getting it when running MLT query.
But the reason is actualy not related to MLT.
If I run search like

http://localhost:9200/myind/post/5b92f025-3f7b-4429-8535-9a20efd55d8f

I'm getting:

{"_index":"myind","_type":"post","_id":"5b92f025-3f7b-4429-8535-9a20efd55d8f","exists":false}

As if there is no document with such ID.
But, if I run:

http://localhost:9200/myind/_search?q=postId:5b92f025-3f7b-4429-8535-9a20efd55d8f

I'm actually getting a document with such ID:

{"took":1,"timed_out":false,"_shards":{"total":5,"successful":
5,"failed":0},"hits":{"total":1,"max_score":9.77106,"hits":

[{"_index":"myind","_type":"post","_id":"5b92f025-3f7b-4429-8535-9a20efd55d8f","_score":
9.77106, "_source" :

{"postId":"5b92f025-3f7b-4429-8535-9a20efd55d8f","description":.............
the rest is truncated

What could be the problem? Why I'm not getting the document from the
first query?

Thanks in advance,
Eugene S.

I'm using just simple call like this:
GetResponse response = clientProvider.getClient()
.prepareGet("myind", "post", "5b92f025-3f7b-4429-8535-9a20efd55d8f")
.execute()
.actionGet();
As well as
http://localhost:9200/myind/post/5b92f025-3f7b-4429-8535-9a20efd55d8f

And actually delete gives me the same:
All such requests (GET, DELETE) give me exist:false or document
missing exception.
But search (any kind, by ID or just text) returns the document.
I've run few more tests, and this behavior is not consistent, some
times I cannot reproduce the problem.
But those documents which got returned by search, but not by get, I
couldn't even get read of them, since Delete also fails to find them.
What could be the problem? Or at least how I could force to remove
those documents from search results?

On Nov 28, 3:14 am, Shay Banon kim...@gmail.com wrote:

Are you using routing or parent mapping where post is a child mapping
(which uses routing)? If so, you need to provide the routing value when
doing a GET.

On Mon, Nov 28, 2011 at 4:18 AM, Eugene Strokin eug...@strokin.info wrote:

I'm getting strange exception. I'm getting it when running MLT query.
But the reason is actualy not related to MLT.
If I run search like

http://localhost:9200/myind/post/5b92f025-3f7b-4429-8535-9a20efd55d8f

I'm getting:

{"_index":"myind","_type":"post","_id":"5b92f025-3f7b-4429-8535-9a20efd55d8 f","exists":false}

As if there is no document with such ID.
But, if I run:

http://localhost:9200/myind/_search?q=postId:5b92f025-3f7b-4429-8535-...

I'm actually getting a document with such ID:

{"took":1,"timed_out":false,"_shards":{"total":5,"successful":
5,"failed":0},"hits":{"total":1,"max_score":9.77106,"hits":

[{"_index":"myind","_type":"post","_id":"5b92f025-3f7b-4429-8535-9a20efd55d 8f","_score":
9.77106, "_source" :

{"postId":"5b92f025-3f7b-4429-8535-9a20efd55d8f","description":............ .
the rest is truncated

What could be the problem? Why I'm not getting the document from the
first query?

Thanks in advance,
Eugene S.

You did not answer the question though, when you index the document, do you
use parent mapping or routing value? If you do, you need to provide the
value, if not, then gist a recreation.

-shay.banon

On Mon, Nov 28, 2011 at 5:40 PM, Eugene Strokin eugene@strokin.info wrote:

I'm using just simple call like this:
GetResponse response = clientProvider.getClient()
.prepareGet("myind", "post",
"5b92f025-3f7b-4429-8535-9a20efd55d8f")
.execute()
.actionGet();
As well as
http://localhost:9200/myind/post/5b92f025-3f7b-4429-8535-9a20efd55d8f

And actually delete gives me the same:
All such requests (GET, DELETE) give me exist:false or document
missing exception.
But search (any kind, by ID or just text) returns the document.
I've run few more tests, and this behavior is not consistent, some
times I cannot reproduce the problem.
But those documents which got returned by search, but not by get, I
couldn't even get read of them, since Delete also fails to find them.
What could be the problem? Or at least how I could force to remove
those documents from search results?

On Nov 28, 3:14 am, Shay Banon kim...@gmail.com wrote:

Are you using routing or parent mapping where post is a child mapping
(which uses routing)? If so, you need to provide the routing value when
doing a GET.

On Mon, Nov 28, 2011 at 4:18 AM, Eugene Strokin eug...@strokin.info
wrote:

I'm getting strange exception. I'm getting it when running MLT query.
But the reason is actualy not related to MLT.
If I run search like

http://localhost:9200/myind/post/5b92f025-3f7b-4429-8535-9a20efd55d8f

I'm getting:

{"_index":"myind","_type":"post","_id":"5b92f025-3f7b-4429-8535-9a20efd55d8
f","exists":false}

As if there is no document with such ID.
But, if I run:

http://localhost:9200/myind/_search?q=postId:5b92f025-3f7b-4429-8535-.
..

I'm actually getting a document with such ID:

{"took":1,"timed_out":false,"_shards":{"total":5,"successful":
5,"failed":0},"hits":{"total":1,"max_score":9.77106,"hits":

[{"_index":"myind","_type":"post","_id":"5b92f025-3f7b-4429-8535-9a20efd55d
8f","_score":

9.77106, "_source" :

{"postId":"5b92f025-3f7b-4429-8535-9a20efd55d8f","description":............
.

the rest is truncated

What could be the problem? Why I'm not getting the document from the
first query?

Thanks in advance,
Eugene S.

Sorry, my bad,.. indexing was straight forward:
Client client = new TransportClient()
.addTransportAddress(new
InetSocketTransportAddress("localhost", 9300));
client.prepareIndex(
"myind", "post", p.getPostId())
.setSource(getContentBuilder(p))
.execute()
.actionGet();

Sorry again for my dumbness, but when you say gist a recreation, you
mean to index a document with the same ID again?

On Nov 28, 11:25 am, Shay Banon kim...@gmail.com wrote:

You did not answer the question though, when you index the document, do you
use parent mapping or routing value? If you do, you need to provide the
value, if not, then gist a recreation.

-shay.banon

On Mon, Nov 28, 2011 at 5:40 PM, Eugene Strokin eug...@strokin.info wrote:

I'm using just simple call like this:
GetResponse response = clientProvider.getClient()
.prepareGet("myind", "post",
"5b92f025-3f7b-4429-8535-9a20efd55d8f")
.execute()
.actionGet();
As well as
http://localhost:9200/myind/post/5b92f025-3f7b-4429-8535-9a20efd55d8f

And actually delete gives me the same:
All such requests (GET, DELETE) give me exist:false or document
missing exception.
But search (any kind, by ID or just text) returns the document.
I've run few more tests, and this behavior is not consistent, some
times I cannot reproduce the problem.
But those documents which got returned by search, but not by get, I
couldn't even get read of them, since Delete also fails to find them.
What could be the problem? Or at least how I could force to remove
those documents from search results?

On Nov 28, 3:14 am, Shay Banon kim...@gmail.com wrote:

Are you using routing or parent mapping where post is a child mapping
(which uses routing)? If so, you need to provide the routing value when
doing a GET.

On Mon, Nov 28, 2011 at 4:18 AM, Eugene Strokin eug...@strokin.info
wrote:

I'm getting strange exception. I'm getting it when running MLT query.
But the reason is actualy not related to MLT.
If I run search like

http://localhost:9200/myind/post/5b92f025-3f7b-4429-8535-9a20efd55d8f

I'm getting:

{"_index":"myind","_type":"post","_id":"5b92f025-3f7b-4429-8535-9a20efd55d8
f","exists":false}

As if there is no document with such ID.
But, if I run:

http://localhost:9200/myind/_search?q=postId:5b92f025-3f7b-4429-8535-.
..

I'm actually getting a document with such ID:

{"took":1,"timed_out":false,"_shards":{"total":5,"successful":
5,"failed":0},"hits":{"total":1,"max_score":9.77106,"hits":

[{"_index":"myind","_type":"post","_id":"5b92f025-3f7b-4429-8535-9a20efd55d
8f","_score":

9.77106, "_source" :

{"postId":"5b92f025-3f7b-4429-8535-9a20efd55d8f","description":............
.

the rest is truncated

What could be the problem? Why I'm not getting the document from the
first query?

Thanks in advance,
Eugene S.

A recreation can either be a simple curl recreation (
Elasticsearch Platform — Find real-time answers at scale | Elastic) or a simple Java main class that
recreates the problem (index some data, do a get, and show that it does not
work).

On Mon, Nov 28, 2011 at 6:41 PM, Eugene Strokin eugene@strokin.info wrote:

Sorry, my bad,.. indexing was straight forward:
Client client = new TransportClient()
.addTransportAddress(new
InetSocketTransportAddress("localhost", 9300));
client.prepareIndex(
"myind", "post", p.getPostId())
.setSource(getContentBuilder(p))
.execute()
.actionGet();

Sorry again for my dumbness, but when you say gist a recreation, you
mean to index a document with the same ID again?

On Nov 28, 11:25 am, Shay Banon kim...@gmail.com wrote:

You did not answer the question though, when you index the document, do
you
use parent mapping or routing value? If you do, you need to provide the
value, if not, then gist a recreation.

-shay.banon

On Mon, Nov 28, 2011 at 5:40 PM, Eugene Strokin eug...@strokin.info
wrote:

I'm using just simple call like this:
GetResponse response = clientProvider.getClient()
.prepareGet("myind", "post",
"5b92f025-3f7b-4429-8535-9a20efd55d8f")
.execute()
.actionGet();
As well as
http://localhost:9200/myind/post/5b92f025-3f7b-4429-8535-9a20efd55d8f

And actually delete gives me the same:
All such requests (GET, DELETE) give me exist:false or document
missing exception.
But search (any kind, by ID or just text) returns the document.
I've run few more tests, and this behavior is not consistent, some
times I cannot reproduce the problem.
But those documents which got returned by search, but not by get, I
couldn't even get read of them, since Delete also fails to find them.
What could be the problem? Or at least how I could force to remove
those documents from search results?

On Nov 28, 3:14 am, Shay Banon kim...@gmail.com wrote:

Are you using routing or parent mapping where post is a child mapping
(which uses routing)? If so, you need to provide the routing value
when
doing a GET.

On Mon, Nov 28, 2011 at 4:18 AM, Eugene Strokin <eug...@strokin.info

wrote:

I'm getting strange exception. I'm getting it when running MLT
query.
But the reason is actualy not related to MLT.
If I run search like

http://localhost:9200/myind/post/5b92f025-3f7b-4429-8535-9a20efd55d8f

I'm getting:

{"_index":"myind","_type":"post","_id":"5b92f025-3f7b-4429-8535-9a20efd55d8

f","exists":false}

As if there is no document with such ID.
But, if I run:

http://localhost:9200/myind/_search?q=postId:5b92f025-3f7b-4429-8535-.

..

I'm actually getting a document with such ID:

{"took":1,"timed_out":false,"_shards":{"total":5,"successful":
5,"failed":0},"hits":{"total":1,"max_score":9.77106,"hits":

[{"_index":"myind","_type":"post","_id":"5b92f025-3f7b-4429-8535-9a20efd55d

8f","_score":

9.77106, "_source" :

{"postId":"5b92f025-3f7b-4429-8535-9a20efd55d8f","description":............

.

the rest is truncated

What could be the problem? Why I'm not getting the document from
the
first query?

Thanks in advance,
Eugene S.

Also, you still did not answer my question :), do you use parent / child
mapping for posts?

On Mon, Nov 28, 2011 at 6:45 PM, Shay Banon kimchy@gmail.com wrote:

A recreation can either be a simple curl recreation (
Elasticsearch Platform — Find real-time answers at scale | Elastic) or a simple Java main class that
recreates the problem (index some data, do a get, and show that it does not
work).

On Mon, Nov 28, 2011 at 6:41 PM, Eugene Strokin eugene@strokin.infowrote:

Sorry, my bad,.. indexing was straight forward:
Client client = new TransportClient()
.addTransportAddress(new
InetSocketTransportAddress("localhost", 9300));
client.prepareIndex(
"myind", "post", p.getPostId())
.setSource(getContentBuilder(p))
.execute()
.actionGet();

Sorry again for my dumbness, but when you say gist a recreation, you
mean to index a document with the same ID again?

On Nov 28, 11:25 am, Shay Banon kim...@gmail.com wrote:

You did not answer the question though, when you index the document, do
you
use parent mapping or routing value? If you do, you need to provide the
value, if not, then gist a recreation.

-shay.banon

On Mon, Nov 28, 2011 at 5:40 PM, Eugene Strokin eug...@strokin.info
wrote:

I'm using just simple call like this:
GetResponse response = clientProvider.getClient()
.prepareGet("myind", "post",
"5b92f025-3f7b-4429-8535-9a20efd55d8f")
.execute()
.actionGet();
As well as
http://localhost:9200/myind/post/5b92f025-3f7b-4429-8535-9a20efd55d8f

And actually delete gives me the same:
All such requests (GET, DELETE) give me exist:false or document
missing exception.
But search (any kind, by ID or just text) returns the document.
I've run few more tests, and this behavior is not consistent, some
times I cannot reproduce the problem.
But those documents which got returned by search, but not by get, I
couldn't even get read of them, since Delete also fails to find them.
What could be the problem? Or at least how I could force to remove
those documents from search results?

On Nov 28, 3:14 am, Shay Banon kim...@gmail.com wrote:

Are you using routing or parent mapping where post is a child
mapping
(which uses routing)? If so, you need to provide the routing value
when
doing a GET.

On Mon, Nov 28, 2011 at 4:18 AM, Eugene Strokin <
eug...@strokin.info>
wrote:

I'm getting strange exception. I'm getting it when running MLT
query.
But the reason is actualy not related to MLT.
If I run search like

http://localhost:9200/myind/post/5b92f025-3f7b-4429-8535-9a20efd55d8f

I'm getting:

{"_index":"myind","_type":"post","_id":"5b92f025-3f7b-4429-8535-9a20efd55d8

f","exists":false}

As if there is no document with such ID.
But, if I run:

http://localhost:9200/myind/_search?q=postId:5b92f025-3f7b-4429-8535-.

..

I'm actually getting a document with such ID:

{"took":1,"timed_out":false,"_shards":{"total":5,"successful":
5,"failed":0},"hits":{"total":1,"max_score":9.77106,"hits":

[{"_index":"myind","_type":"post","_id":"5b92f025-3f7b-4429-8535-9a20efd55d

8f","_score":

9.77106, "_source" :

{"postId":"5b92f025-3f7b-4429-8535-9a20efd55d8f","description":............

.

the rest is truncated

What could be the problem? Why I'm not getting the document from
the
first query?

Thanks in advance,
Eugene S.