I have added new field in the existing index using-
POST honeypot/_mapping/type
{
"properties" :
{
"extract_only_url" :
{
"type":"string",
"index" :"not_analyzed"
}
}
}
Now when i try to access this index using python -
res = es.search(index = 'honeypot',size=honeyport_doc_count, body={"query": {"match_all": {}}})
print res
In the above response, newly added field is not visible in printing 'res'. I need to update this newly added field using python script.
@dadoonet This is what i am asking, Basically i added new field in elasticsearch mapping but how can i add new field in all documents syntactically.
Reindexing basically copy all the document from old index to new index but how the new field will be added in documents?
if _update_by_query works for this,then how to write that?
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.