You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Yandong Yao <yy...@gmail.com> on 2012/09/12 11:28:29 UTC
number of documents in one care are different after core moved to
another server
Hi Guys,
I try to move one Solr Core from machine A to machine B, while the number
of documents are different before unload on A (numDoc=190021) and after
load on B (numDoc=190816).
I am using following code to unload it on machine A:
StreamingUpdateSolrServer server = /get/SolrServer;
server.blockUntilFinished();
server.commit(true, false);
// Unload core using CoreAdmin API
SolrCoreUtils.unLoadCore();
On machine B, I am using solr CoreAdmin API to create a new core using
existing core directory copied from A.
Why the number of documents increase? Is it related with autoCommit or
deletion?
I pasted solrconfig.xml at http://pastebin.com/gDXJpViv, also inlined some
important setting below.
<directoryFactory name="DirectoryFactory"
class="${solr.directoryFactory:solr.NIOFSDirectoryFactory}"/>
....
<indexDefaults>
<useCompoundFile>true</useCompoundFile>
<mergeFactor>10</mergeFactor>
<!-- Sets the amount of RAM that may be used by Lucene indexing
for buffering added documents and deletions before they are
flushed to the Directory. -->
<ramBufferSizeMB>256</ramBufferSizeMB>
<!-- If both ramBufferSizeMB and maxBufferedDocs is set, then
Lucene will flush based on whichever limit is hit first.
-->
<!-- <maxBufferedDocs>1000</maxBufferedDocs> -->
<maxFieldLength>10000</maxFieldLength>
<writeLockTimeout>1000</writeLockTimeout>
<commitLockTimeout>10000</commitLockTimeout>
</indexDefaults>
<deletionPolicy class="solr.SolrDeletionPolicy">
<!-- The number of commit points to be kept -->
<str name="maxCommitsToKeep">1</str>
<!-- The number of optimized commit points to be kept -->
<str name="maxOptimizedCommitsToKeep">0</str>
<!--
Delete all commit points once they have reached the given age.
Supports DateMathParser syntax e.g.
-->
<!--
<str name="maxCommitAge">30MINUTES</str>
<str name="maxCommitAge">1DAY</str>
-->
</deletionPolicy>
<autoCommit>
<maxDocs>10000</maxDocs>
<maxTime>5000</maxTime>
</autoCommit>
BTW: Solr version is 4.0.
Thanks very much in advance!
Yandong