I read the section here on compressing the source field:
http://www.elasticsearch.org/guide/reference/mapping/source-field.html
Is there a Java API that will allow me to set the "compress" value on the
_source field to true?
Thanks,
Raj
I read the section here on compressing the source field:
http://www.elasticsearch.org/guide/reference/mapping/source-field.html
Is there a Java API that will allow me to set the "compress" value on the
_source field to true?
Thanks,
Raj
Hi Raj,
There is no dedicated method for this in the api as far as I know. If
you want to use the compress option from the Java api then it looks
like this:
String mapping =
XContentFactory.jsonBuilder().startObject().startObject("type1")
.startObject("_source").field("compress", compress).endObject()
.endObject().endObject().string();
client.admin().indices().preparePutMapping().setType("type1").setSource(mapping).execute().actionGet();
Martijn
On 1 August 2012 00:11, re92 rajawesome@gmail.com wrote:
I read the section here on compressing the source field:
Elasticsearch Platform — Find real-time answers at scale | ElasticIs there a Java API that will allow me to set the "compress" value on the
_source field to true?Thanks,
Raj
--
Met vriendelijke groet,
Martijn van Groningen
Thanks Martin. I set it up with curl for now, but will follow your steps in
Java.
Raj
On Wednesday, August 1, 2012 9:09:58 AM UTC-4, Martijn v Groningen wrote:
Hi Raj,
There is no dedicated method for this in the api as far as I know. If
you want to use the compress option from the Java api then it looks
like this:
String mapping =
XContentFactory.jsonBuilder().startObject().startObject("type1")
.startObject("_source").field("compress",
compress).endObject()
.endObject().endObject().string();client.admin().indices().preparePutMapping().setType("type1").setSource(mapping).execute().actionGet();
Martijn
On 1 August 2012 00:11, re92 rajawesome@gmail.com wrote:
I read the section here on compressing the source field:
Elasticsearch Platform — Find real-time answers at scale | ElasticIs there a Java API that will allow me to set the "compress" value on
the
_source field to true?Thanks,
Raj--
Met vriendelijke groet,Martijn van Groningen
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.