...
Code Block |
---|
language | xml |
---|
title | solrconfig.xml |
---|
firstline | 349 |
---|
|
<!-- AutoCommit
Perform a hard commit automatically under certain conditions.
Instead of enabling autoCommit, consider using "commitWithin"
when adding documents.
http://wiki.apache.org/solr/UpdateXmlMessages
maxDocs - Maximum number of documents to add since the last
commit before automatically triggering a new commit.
maxTime - Maximum amount of time in ms that is allowed to pass
since a document was added before automatically
triggering a new commit.
openSearcher - if false, the commit causes recent index changes
to be flushed to stable storage, but does not cause a new
searcher to be opened to make those changes visible.
If the updateLog is enabled, then it's highly recommended to
have some sort of hard autoCommit to limit the log size.
-->
<autoCommit>
<maxTime>${solr.autoCommit.maxTime:15000}</maxTime>
<openSearcher>false</openSearcher>
</autoCommit> |
Start solr and verify that it is running at http://localhost:8983/solr.
Code Block |
---|
|
cd solr-4.6.0/example
java -jar start.jar |
Add the "uuid" field ("title" and "id" already exist).
Code Block |
---|
|
curl -X POST -H "Content-Type: application/json" -d "@solr-fields.json" "http://localhost:8986/solr/schema/fields" |
Code Block |
---|
|
[{"name":"uuid","type":"text_general","stored":"true","indexed":"true"}] |