POST _xpack/sql?format=txt
{
"query" : "SELECT gain_factor, gain FROM my_index"
}
I'm getting that a lot documents in the field gain are null. my target is just add a new field in my index and set "exist" in gain field when gain_factor > 1.0 and when gain_factor < 1.0 set "no-exist" in gain field. How can i do that?
Take a look at the docinfo option on the elasticsearch input. You will need that to preserve the document_id so that you can overwrite an existing document.
The handling of document_type is probably going to confuse you. It is in the process of being retired, so the documentation says you need it (and you may) but if you use it then the software warns you not to use it.
Start off by setting 'docinfo => true' on the input and setting
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.