Hello,
I remember it was impossible to retrieve index mappings via java api.
Workaround was to use REST api. Are there any improvements in java api for
0.19.0?
Thanks,
Alexandr Vasilenko
Hello,
I remember it was impossible to retrieve index mappings via java api.
Workaround was to use REST api. Are there any improvements in java api for
0.19.0?
Thanks,
Alexandr Vasilenko
You can use the Java API to get the mapping. Note that all REST endpoints use the Java API to do the actual work, so there isn't anything you can do with rest that you can't do with Java. Some REST endpoints though are more concrete or specialized and use a more generic Java API.
In this case, getting the mapping uses the cluster state API. Here is the REST implementation: https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/rest/action/admin/indices/mapping/get/RestGetMappingAction.java#L66.
On Tuesday, March 6, 2012 at 8:08 PM, Alex Vasilenko wrote:
Hello,
I remember it was impossible to retrieve index mappings via java api. Workaround was to use REST api. Are there any improvements in java api for 0.19.0?
Thanks,
Alexandr Vasilenko
Thanks Shay. Next time I'll check source first.
Alex
2012/3/6 Shay Banon kimchy@gmail.com
You can use the Java API to get the mapping. Note that all REST endpoints
use the Java API to do the actual work, so there isn't anything you can do
with rest that you can't do with Java. Some REST endpoints though are more
concrete or specialized and use a more generic Java API.In this case, getting the mapping uses the cluster state API. Here is the
REST implementation:
https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/rest/action/admin/indices/mapping/get/RestGetMappingAction.java#L66
.On Tuesday, March 6, 2012 at 8:08 PM, Alex Vasilenko wrote:
Hello,
I remember it was impossible to retrieve index mappings via java api.
Workaround was to use REST api. Are there any improvements in java api for
0.19.0?Thanks,
Alexandr Vasilenko
© 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.