In the past (ES 2+) I could assign mappings to index names programmatically. In 6.3.1, there is a CreateIndexRequest/Response pair, but the documentation online says to use it with an API which does not exist. Most ES docs talk about using CURL; that's not an option. Can someone point me to a Gist or documentation that doesn't say "this is a preliminary document"?
Similarly, I need to test if the index already exists to avoid re-creating it.
I applied that code in an Eclipse IDE and get this error message:
The method performRequest(String, String, Map<String,String>, Header...) in the type RestClient is not applicable for the arguments (String, String, Map<Object,Object>, StringEntity)
I switched your emptyCollection to new HashMap<String, String>() and the error went away. Still have to test this now. Thanks!
@dadoonet I guess I need to revisit this: It appears to be the case that I can create the index; index settings were about numshards and numreplicas. What is missing for me at the moment is declaring the mappings on that index. The "putMappings" method is missing from the 6+ series. Thoughts?
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.