On 6/27/2018 10:00 AM, Goston IV, Stanley W wrote:
> I was wondering if it is possible to do a solr update by doing something like 
> the following:
>
> JSON:
>
> {
>   "add":{
>     "doc":{
>       "id_txt":"_query_:{q=title_txt:test.jpg fl=id_txt}",
>       "title_txt": {"set":"Maybe"},
>       "location_geo": {"set":"POINT(-108.5491667 57.71194444)"}
>     }
>   }
> }
<snip>
> I need to be able to do a nested query to get the unique id since I do not 
> know it without performing a query.

As far as I am aware, this is not possible.  Others probably know for
sure.  I have never heard of anything like this.

You will probably need to do the query in whatever software is building
the update requests before that part of the update is built.

Because your example update sets the field you're querying on to a new
value, that same query executed again isn't going to work after the
change is committed.

Thanks,
Shawn

  • Solr Update Goston IV, Stanley W
    • Re: Solr Update Shawn Heisey

Reply via email to