Update values by curl cmd

Hello !

Can I update the "instanceof" values by there equivalents labels ( municipalities and cities of Serbia == Q783930 ) by curl API ?

Thanks :slight_smile:

returned answer sample:
{
"_index" : "enwiki_latest",
"_type" : "_doc",
"_id" : "Q714606",
"_score" : 40.787083,
"_source" : {
"descriptions" : "Municipality of Belgrade, Serbia",
"labels" : "Lazarevac",
"instanceof" : [
"Q783930",
"Q515",
"Q56061",
"Q1267939",
"Q648681"
]
},
"matched_queries" : [
"belgrade"
]
}

Are you looking for Update By Query API?

Okay !

curl -X POST "localhost:9200/enwiki_latest/_update/Q2900589?pretty" -H 'Content-Type: application/json' -d'
{
"doc" : {
"instanceof" : [
"human settlement"
]
}
}
'

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.