In order for the code bellow to work:
► Make sure to update the variables ("
solrUrl
", "
collectionName
", ...) with your information.
To force the commit, make sure to set the property "
openSearcher
" to true (
SolrConfigXml file ->
updateHandler ->
autoCommit)
Note: You can also force the commit by running the URL:
http://localhost:8983/solr/COLLECTION-NAME/update?commit=true