Hi,
I have decided to upgrade my index to SOLR 4.6.0 Its quite small now
(~40 000 simple docs). It should be optimized to efficient search and
regular inserts (10-20 new docs every few minutes).
I did follow the manual and have prepared index divided into 2 shards, 4
replicas each.
When I'm taking data from dataimport handler -it works fine. But when
comes to the collection which gets data from external source through xml:
- leader serves fresh data each 2 minutes (exactly as it states in config)
- replicas does get the data (I can see that as pending documents) but
does not trigger the commit until it is forced (eg by optimize index on
leader)
The question is: How to force replicas to commit documents when
autocommit is made on leader?
I would appreciate any suggestions.
Thanks in advance,
Tom
my config goes like this:
|<config>
<luceneMatchVersion>4.5</luceneMatchVersion>
<directoryFactory name="DirectoryFactory"
class="${solr.directoryFactory:solr.StandardDirectoryFactory}"/>
<dataDir>${solr.data.dir:}</dataDir>
<schemaFactory class="ClassicIndexSchemaFactory"/>
<updateHandler class="solr.DirectUpdateHandler2">
<updateLog>
<str name="dir">${solr.data.dir:}</str>
</updateLog>
<maxPendingDeletes>200</maxPendingDeletes>
<autoCommit>
<maxDocs>100</maxDocs>
<maxTime>15000</maxTime> <!-- maximum time (in MS) after adding a doc before an autocommit is triggered -->
<openSearcher>false</openSearcher>
</autoCommit>
<autoSoftCommit>
<maxDocs>1000</maxDocs> <!-- maximum uncommited docs before autocommit
triggered -->
<maxTime>120000</maxTime> <!-- maximum time (in MS) after adding a doc
before an autocommit is triggered -->
</autoSoftCommit>
</updateHandler>
<requestHandler name="/get" class="solr.RealTimeGetHandler">
<lst name="defaults">
<str name="omitHeader">true</str>
</lst>
</requestHandler>
<requestDispatcher handleSelect="true" >
<requestParsers enableRemoteStreaming="false" multipartUploadLimitInKB="2048"
formdataUploadLimitInKB="2048" />
</requestDispatcher>
<requestHandler name="standard" class="solr.StandardRequestHandler" default="true" />
<requestHandler name="/analysis/field" startup="lazy"
class="solr.FieldAnalysisRequestHandler" />
<requestHandler name="/analysis/document"
class="solr.DocumentAnalysisRequestHandler" />
<requestHandler name="/update" class="solr.UpdateRequestHandler" />
<requestHandler name="/admin/"
class="org.apache.solr.handler.admin.AdminHandlers" />
<requestHandler name="/admin/ping" class="solr.PingRequestHandler">
<str name="healthcheckFile">server-enabled.txt</str>
<lst name="invariants">
<str name="q">solrpingquery</str>
</lst>
<lst name="defaults">
<str name="echoParams">all</str>
</lst>
</requestHandler>
<requestHandler name="/replication" class="solr.ReplicationHandler"
startup="lazy" />
<!-- config for the admin interface -->
<admin>
<defaultQuery>solr</defaultQuery>
</admin>
<query>
<maxBooleanClauses>5120</maxBooleanClauses>
<filterCache class="solr.FastLRUCache" size="4096" initialSize="4096"
autowarmCount="2048"/>
<queryResultCache class="solr.LRUCache" size="10240" initialSize="10240"
autowarmCount="4096"/>
<documentCache class="solr.LRUCache" size="4096" initialSize="4096"
autowarmCount="2048"/>
<enableLazyFieldLoading>true</enableLazyFieldLoading>
<queryResultWindowSize>20</queryResultWindowSize>
<queryResultMaxDocsCached>200</queryResultMaxDocsCached>
<useColdSearcher>false</useColdSearcher>
<maxWarmingSearchers>6</maxWarmingSearchers>
</query>
</config>|
udateHandler stats from replica:
* stats:
o
commits:
0
o
autocommits:
0
o
soft autocommits:
0
o
optimizes:
4
o
rollbacks:
0
o
expungeDeletes:
0
o
docsPending:
10
o
adds:
10
o
deletesById:
2
o
deletesByQuery:
0
o
errors:
0
o
cumulative_adds:
49879
o
cumulative_deletesById:
43107
o
cumulative_deletesByQuery:
0
o
cumulative_errors:
0