I'm trying to create an index and mapping using the Java API but I am not
getting the results I expect. Using the code shown in the gist below
results in the index being created, but the mapping isn't applied to the
index:
Creating the index/mapping using the REST API directly via curl works. I've tried a few different permutations using the Java API based on various examples on this list without success , so I am at a bit of a loss as to what is going on here. Does anyone have some concrete examples of successfully creating an index/mapping using the Java API?
--
David
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
Le 5 août 2013 à 12:27, tim_siney@salvationarmy.org a écrit :
Hi,
I'm trying to create an index and mapping using the Java API but I am not getting the results I expect. Using the code shown in the gist below results in the index being created, but the mapping isn't applied to the index:
Creating the index/mapping using the REST API directly via curl works. I've tried a few different permutations using the Java API based on various examples on this list without success , so I am at a bit of a loss as to what is going on here. Does anyone have some concrete examples of successfully creating an index/mapping using the Java API?
Thanks David, that gave me the information I was looking for. For
reference, I refactored the code in the original email into this:
The problem with my original code was that I was trying to create the index
and mapping in the same API call. Splitting them into 2 separate calls
fixed the issue.
On Monday, August 5, 2013 1:03:22 PM UTC+1, David Pilato wrote:
I'm trying to create an index and mapping using the Java API but I am not
getting the results I expect. Using the code shown in the gist below
results in the index being created, but the mapping isn't applied to the
index:
Creating the index/mapping using the REST API directly via curl works. I've tried a few different permutations using the Java API based on various examples on this list without success , so I am at a bit of a loss as to what is going on here. Does anyone have some concrete examples of successfully creating an index/mapping using the Java API?
Thanks!
Tim
--
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.
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.