I am getting 200 OK.
For standalone, I created a single node cluster, I have set cluster name
and node.anme in elasticsearch.yml. Looks like that is the problem, if I
restore to default (no cluster and node name set in elasticsearch.yml) I
get true for indices....exist().
My mapping is
{"type1":{"properties":{"description":{"type":"string"},"id":{"type":
"string"},"name":{"type":"string"}}}} . I see the same structure as output
for curl -XGET http://localhost:9200/_mapping
With default setting, I tried adding index (json as below) and in
console could not see any exception
"id":"TEST2113-FFC4-4EE1-94A5-764D9EFD2C70","description":"sample
test","name":"test it".
But
curl -XGET
http://localhost:9200/test/type1/TEST2113-FFC4-4EE1-94A5-764D9EFD2C70 returns
{"_index":"test","_type":"asset","type1":"TEST2113-FFC4-4EE1-94A5-764D9EFD2C70","exists":
false}. Thus looks like index is not getting created.
I could see in the console [Flambe] [Test] creating index, cause
[auto(index api)], shards [1]/[1], mappings . Does this mean Java api is
not able to pick the mapping
Here is the code snippet I am using to add the index
Settings settings = ImmutableSettings.settingsBuilder()
.put("index.store.type", "simplefs")
.put("index.store.fs.memory.enabled", "false")
.put("gateway.type", "none")
.put("path.data", "E:\elasticsearch-0.20.5\temp\data")
.put("path.work", "E:\elasticsearch-0.20.5\temp\work")
.put("path.logs", "E:\elasticsearch-0.20.5\temp\logs")
.put("index.number_of_shards", "1")
.put("index.number_of_replicas", "1")
.put("node.local", true).build();
Client client =
NodeBuilder.nodeBuilder().settings(settings).node().client();
IndexRequestBuilder builder = client.prepareIndex();
builder.setIndex("test");
builder.setType("type1");
builder.setId("TEST2113-FFC4-4EE1-94A5-764D9EFD2C70");
builder.setSource(jsonString);
builder.setRefresh(true);
IndexResponse resp = client.index(builder.request()).get();
Please help
On Friday, March 22, 2013 12:37:47 PM UTC+5:30, Alexander Reelsen wrote:
Hey,
when you do
curl -X HEAD -v localhost:9200/test
Are you getting back a HTTP 200? Apart from that, can you post some
snippets, how you are initiating your connection to the elasticsearch node?
This might help in order to find your problem..
--Alex
On Fri, Mar 22, 2013 at 7:35 AM, Chetana <ambha....@gmail.com<javascript:>
wrote:
I am new to Elasticsearch. Using Elastic search(version 0.20.5) as
Standalone. I have created index using 'curl -XPUT '
http://localhost:9200/test/''. I could also see empty mapping for
'''test' when I run curl -XGET http://localhost:9200/_mapping, but the
call to
'client.admin().indices().prepareExists("test").execute().actionGet().exists()'
returns false
Is it ok to set "node.name" in elasticsearch.yml for the standalone mode
'
--
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 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.