I've been using elastic since about 2009 ... and I've always found myself embedding elastic into our app - and configuring it programmatically.
I've always found programmatically configuring the mapping for an index to be quite clunky.
But perhaps I just havent paid close attention to the enhancements over the years and I am now Doing It Wrong.
So, what is the best/cleanest way to configure mappings programmatically?
For me its Java... (I'm running elastic embedded)
I dont know of anything like that in the Java API (but I might be wrong).
(like your example, I have generally had to write something to generate the Map representing the mappings - I just wish there was a nicer java api for specifying the mappings)
Yes, creating a json document - or a map - theyre of the same class. They're both pretty clunky.
I guess the one advantage is that you can compare the json file with what you think it should look like from the documentation.
But fundamentally, there are a fixed number of types, and a fixed number of options for each type - surely we can encapsulate that in a mapping builder api..
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.