I am trying to add a mapping for a new type to an existing index in ES 2.3.3. I'm following he the examples from here and here but keep getting the result seen below. Any idea why this is generating an error?
The problem is, that, as the error says, the index already exists.
See the doc page in your first link. The API call you are using is for defining the mapping when creating a new index. Use the other examples, for adding a type to an existing index.
To me, this implies that any of the three examples would all you to add a new type to an existing index. I now know, since I've tried the other two examples, that only the last two will add a new type to an existing index. At least to me, the doc is inconsistent with the observed behavior.
Creates an index called twitter with the message field in the tweet mapping type.
I'll concede that you may have a point about the documentation. I hope, though, that now your understanding of how that API behaves is cleared up, and you can use the appropriate endpoint to accomplish your design goals.
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.