I get the exception,
exception [type=illegal_argument_exception, reason=Rejecting mapping update to [cartoon-raw-ekenebt-2019-01-21] as the final mapping would have more than 1 type: [_doc, SEEC0746A8F2B5_26JUL071p0019145AASEEC079j000999]]]]
I can't figure out why adding "_doc" fixes this exception?
There are a number of constructors for IndexRequest, and the two relevant ones here are:
public IndexRequest(String index, String type);
public IndexRequest(String index, String type, String id);
When you pass three arguments you are giving the index, the type, and the document ID, but when you pass two you are giving the index and the type. The error message indicates that you are passing SEEC0746A8F2B5_26JUL071p0019145AASEEC079j000999 for the type, but this looks like a document ID, and that is probably not what you want.
I am doing this in preparation for the removal of mapping types in elasticsearch. This is where I used to have my project specific type value. With the removal of types, will I always put "_doc" in for the type field? I know there is the notion of custom types but in general what should I put in for type once I have removed type from my index mapping?
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.