Query then update documents by using scripting

Hi fellows,

Is there a way to do query first then update specific field of the
documents returned on server side? I found there are scripting tutorials on
querying and updating documents respectively, but there is nothing on
combining these two together.

Thanks in advance

Shawn

--

1 Like

Hi Shawn,

One way to do it is from your application. For example, do a query, take
the results, change them to whatever you want, then update them. If you
have too many results, you might need to do a scroll on your search results.

On Sunday, September 2, 2012 6:38:04 PM UTC+3, shawn wrote:

Hi fellows,

Is there a way to do query first then update specific field of the
documents returned on server side? I found there are scripting tutorials on
querying and updating documents respectively, but there is nothing on
combining these two together.

Thanks in advance

Shawn

--