Added update by query api. #2230