solr

Most simple way (URL?) to trigger SOLR commit of all pending docs?


What's the most simple way to cause a SOLR installation to commit all pending docs?

(There's no obvious way in the admin interface. There's a script called 'commit' mentioned on the page http://wiki.apache.org/solr/SolrOperationsTools -- but no hint where that lives. 'Commit' is clearly an option that can be added to any update POST, but I can't find any reference to a single URL that serves to only commit.)


Solution

  • THIS HOLDS FOR SOLR VERSIONS < 5.0

    Try [solr url]/update?commit=true

    For example, with an URL like the SOLR example defaults, from the same machine, http://localhost:8983/solr/update?commit=true should do it.

    FOR SOLR VERSIONS >= 5.0
    http://localhost:8983/solr/%5Bcollection_name%5D/update?commit=true