_update_by_query - Update with match criteria in other index


(Lai Ying) #1

I trying to loop thrus a single index (eg: userprofiles) and update the single field (eg: user_type) if the userprofiles.NAME is exist in other index (eg: badlistedusers)

Can "_update_by_query" API do that?

userprofiles mapping

"mappings" : {
"doc": {
"properties" : {
"NAME" : { "type" : "text" },
"USER_TYPE" : { "type" : "text" }
}
}
}

badlistedusers mapping

"mappings" : {
"doc": {
"properties" : {
"NAME" : { "type" : "text" }
}
}
}


(system) #2

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