On 12/13/2019 9:23 AM, rhys J wrote:
When I do the following update:

curl http://localhost:8983/solr/debt/update -d '[ {"id": "393291-18625",
"orig_int_amt":{ "set" : "2.5"}, }]'

and then:

curl http://localhost:8983/solr/debt/get?id=393291-18625

I see the document is updated via the command line.

It shows the following:
<snip>
     "orig_int_amt":2.5,
<snip>
         "orig_int_amt":0.0,
<snip>
How do I get the updates to show in the API?

Is there a step I'm missing?

It appears that you have not executed a commit that opens a new searcher.

You can see the change in the realtime get handler (/get) which shows the latest version of documents, even those that have been indexed but aren't yet visible to normal searchers, but you can't see it when using the normal searcher.

https://lucene.apache.org/solr/guide/6_6/realtime-get.html

The simplest solution is to issue a commit and let Solr open a new searcher.

Example Solr configs are set up with autoCommit, using a 15 second maxTime, but in that config, openSearcher is set to false. Which means that the automatic commits will NOT have their changes visible. If you want changes to be automatically visible even if you never send an explicit commit, you'll need to set that up.

https://lucidworks.com/post/understanding-transaction-logs-softcommit-and-commit-in-sorlcloud/

That blog post says it is for SolrCloud, but its concepts are universal and do not depend on Solr running in cloud mode.

Thanks,
Shawn

Reply via email to