Hi,

This is above result is what I want to be able to commit but when I run the
> same command with commit=true it will not work like below.
> curl
> 'http://54.146.2.60:8983/solr/eatzcollection/update/json?commit=true' -d
> '[{"id":"location_23_deal_51","votes":"23"}]' -H
> 'Content-type:application/json'
>



I suppose you had missed writing set for votes? I think in that case,
there's probably an indexing error (since you didn't mention all the
fields) that caused nothing to get indexed (notice the version is the
same).

On Wed, 12 Feb 2020 at 21:40, logancraft <craftlo...@icloud.com.invalid>
wrote:

> So I am trying to do a partial update to a document in Solr, but it will
> not
> commit!
>
> So this is the original doc I am trying to update with 11 votes.
>
> {
>   "doc":
>   {
>     "id":"location_23_deal_51",
>     "deal_id":"deal_51",
>     "deal":"$1.99 Kid's Meal with Purchase of Adult Meal",
>     "rating":"3",
>     "votes":"11",
>     "deal_restaurant":"Moe's BBQ",
>     "deal_type":"Kids",
>     "content_type":"deal",
>     "day":"Sunday",
>     "_version_":1658287992903565312
>   }
> }
>
> So I can run the command without the commit and it works like below:
>
> curl 'http://54.146.2.60:8983/solr/eatzcollection/update/json' -d
> '[{"id":"location_23_deal_51","votes":{"set":23}}]' -H
> 'Content-type:application/json'
>
>
> And then I run a get command it returns the right results.
>
> curl
> http://54.146.2.60:8983/solr/eatzcollection/get\?id\=location_23_deal_51
>
> {
>   "doc":
>   {
>     "id":"location_23_deal_51",
>     "deal_id":"deal_51",
>     "deal":"$1.99 Kid's Meal with Purchase of Adult Meal",
>     "rating":"3",
>     "votes":"23",
>     "deal_restaurant":"Moe's BBQ",
>     "deal_type":"Kids",
>     "content_type":"deal",
>     "day":"Sunday",
>     "_version_":1658297071939092480
>   }
> }
>
>
> This is above result is what I want to be able to commit but when I run the
> same command with commit=true it will not work like below.
>
> curl 'http://54.146.2.60:8983/solr/eatzcollection/update/json?commit=true'
> -d '[{"id":"location_23_deal_51","votes":"23"}]' -H
> 'Content-type:application/json'
>
> And I run the get command I get the wrong result.
>
> curl
> http://54.146.2.60:8983/solr/eatzcollection/get\?id\=location_23_deal_51
>
> {
>   "doc":
>   {
>     "id":"location_23_deal_51",
>     "deal_id":"deal_51",
>     "deal":"$1.99 Kid's Meal with Purchase of Adult Meal",
>     "rating":"3",
>     "votes":"11",
>     "deal_restaurant":"Moe's BBQ",
>     "deal_type":"Kids",
>     "content_type":"deal",
>     "day":"Sunday",
>     "_version_":1658287992903565312
>   }
> }
>
>
> I have tried a lot different query string like update/json, /update, but
> they all stop working when I add the commit=true parameter to the query
> string.
>
> Any ideas will be much appreciated!
>
>
>
>
>
>
>
>
>
>
>
> --
> Sent from: https://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>


-- 
-- 
Regards,

*Paras Lehana* [65871]
Development Engineer, *Auto-Suggest*,
IndiaMART InterMESH Ltd,

11th Floor, Tower 2, Assotech Business Cresterra,
Plot No. 22, Sector 135, Noida, Uttar Pradesh, India 201305

Mob.: +91-9560911996
Work: 0120-4056700 | Extn:
*11096*

-- 
*
*

 <https://www.facebook.com/IndiaMART/videos/578196442936091/>

Reply via email to