The commit policy of SOLR is known:
Server:
1) autocommit
2) autosoftcommit
Client commit
This time I tested the effect of adjusting the server-side commit policy when the client closes the commit.
First, disable the client commit and use the following command to submit:
Curl 'HTTP: // localhost: 8983/SOLR/core0/update? Commit = false '-H' Content-Type: text/json'-d' [{"ID": "2", "name": "Haier"}]'
Curl 'HTTP: // localhost: 8983/SOLR/core0/update? Commit = false '-H' Content-Type: text/json'-d' [{"ID": "2", "name": "117go"}]'
The test results are as follows:
Test Policy Description |
Operation |
Search results |
Search results after SOLR restart |
SEARCH Command |
Server Configuration <Autocommit> <maxtime >$ {SOLR. autocommit. maxtime: 5000} </maxtime> <opensearcher> false </opensearcher> </autocommit> |
Client submit operation |
Unable to search |
Searchable (no recovery process) |
Use SOLR query: Http: // localhost: 8983/SOLR/core0? Q = ID: 2 & Wt = JSON & indent = true |
Server Configuration <Autocommit> <maxtime >$ {SOLR. autocommit. maxtime: 5000} </maxtime> <opensearcher> true </opensearcher> </autocommit> |
Client submit operation |
Cannot be retrieved immediately. A few seconds later. |
Searchable (no recovery process) |
Use SOLR query: Http: // localhost: 8983/SOLR/core0? Q = ID: 2 & Wt = JSON & indent = true |
server configuration $ {SOLR. autosoftcommit. maxtime:-1 } |
submit the client |
searchable |
the recovery process is used first and then can be retrieved. If the transaction log is deleted, it cannot be retrieved. |
Use SOLR query: http: // localhost: 8983/SOLR/core0? Q = ID: 2 & Wt = JSON & indent = true |
Server Configuration <Autosoftcommit> <maxtime >$ {SOLR. autosoftcommit. maxtime:-1} </maxtime> </autosoftcommit> <autocommit> <maxtime >$ {SOLR. autocommit. maxtime: 5000 }</maxtime> <opensearcher> false </opensearcher> </autocommit> |
Client submit operation |
Searchable |
|
Use SOLR query: Http: // localhost: 8983/SOLR/core0? Q = ID: 2 & Wt = JSON & indent = true |
The above is a commit policy attempt on the SOLR server.
SOLR commit policy test