Hi,
Tried to create index on clean elasticsearch 0.16.1 and got exception:
The code :
IndexResponse indexRes = client.prepareIndex("test", "contacts",
"1")
.setSource(jsonBuilder()
.startObject()
.field("Name", "Test")
.field("BirthDate", new Date())
.field("Email", "test@test.com")
.endObject()
).execute()
.actionGet();
Exception in thread "main"
org.elasticsearch.indices.IndexMissingException: [test] missing
at
org.elasticsearch.cluster.metadata.MetaData.concreteIndex(MetaData.java:
211)
at
org.elasticsearch.action.index.TransportIndexAction.innerExecute(TransportIndexAction.java:
123)
at org.elasticsearch.action.index.TransportIndexAction.access
$000(TransportIndexAction.java:70)
at org.elasticsearch.action.index.TransportIndexAction
$1.onResponse(TransportIndexAction.java:104)
at org.elasticsearch.action.index.TransportIndexAction
$1.onResponse(TransportIndexAction.java:102)
at org.elasticsearch.action.support.BaseAction$ThreadedActionListener
$1.run(BaseAction.java:84)
at java.util.concurrent.ThreadPoolExecutor
$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Next run of the same code - works fine.
Another issue that I can't exactly isolate the behavior is I have code
that creates indexes with long and complex index name and id = 1
then after index is created , the search across _all doesn't return
any hits. Same code, with id = null works file and search returns
hits.
Same code with simple index name :
IndexResponse indexRes = client.prepareIndex("test", "contacts",
"1")
.setSource(jsonBuilder()
.startObject()
.field("Name", "Test")
.field("BirthDate", new Date())
.field("Email", "test@test.com")
.endObject()
).execute()
.actionGet();
even with id = 1 makes next search positive. I really tried to find
what I'm doing wrong, but same code, differences only index name and
id.
Clean installation of elasticsearch.
Thank You and Best Regards/