Re: Elasticsearch index mapping in java

2014-03-13 Thread Nikita Tovstoles
fwiw, I fixed my issue below by using prepareCreate().setSource() - rather than .setSettings() with idx config in the following format: {"settings" : { "index": { "number_of_shards" : 1, "number_of_replicas": 0, "analysis" : { "analyzer": { "lowercase_keywor

Re: Elasticsearch index mapping in java

2014-03-13 Thread Binh Ly
:) I was confused. I meant to reply to OP. Thanks! -- 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+unsubscr...@googlegroups.com. To view this disc

Re: Elasticsearch index mapping in java

2014-03-13 Thread Nikita Tovstoles
yep, that's what i used (see my prior post) On Thu, Mar 13, 2014 at 1:08 PM, Binh Ly wrote: > prepareIndex() is to index a document. What you want is prepareCreate(). I > have an example here (check the method createIndexFullMapping()): > > > https://github.com/bly2k/es-java-examples/blob/maste

Re: Elasticsearch index mapping in java

2014-03-13 Thread Binh Ly
prepareIndex() is to index a document. What you want is prepareCreate(). I have an example here (check the method createIndexFullMapping()): https://github.com/bly2k/es-java-examples/blob/master/admin/IndexAdminExample.java -- You received this message because you are subscribed to the Google G

Re: Elasticsearch index mapping in java

2014-03-13 Thread Nikita Tovstoles
Hi, Kevin: Create Index refsays mappings can be included in index settings JSON. Are you saying that's not supported by the Java client? (Fwiw, I am seeing the same - just wanted to confir

Re: Elasticsearch index mapping in java

2014-02-04 Thread Kevin Wang
The index request is used to index document, you should use put mapping request. e,g, PutMappingResponse response = client.admin().indices().preparePutMapping(INDEX).setType(INDEX_TYPE).setSource(source).get(); On Wednesday, February 5, 2014 1:27:41 AM UTC+11, Doru Sular wrote: > > Hi guys, >

Elasticsearch index mapping in java

2014-02-04 Thread Doru Sular
Hi guys, I am trying to create an index with the following code: XContentBuilder source = XContentFactory.jsonBuilder().startObject()// .startObject("settings") .field("number_of_shards", 1) .endObject()// end settings .startObjec