SOLR commit policy test

Source: Internet
Author: User
Tags solr solr query

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.