2014-01-28 4 views
0

Когда стартует полный импорт с помощью:SOLR 4,4 индексирование постепенно

curl -X POST http://_master_host_:_port_/solr/dataimport-xml?command=full-import 

Это вызывает наш индекс обновлять постепенно. Поэтому скажем, что количество инвентаря составляет 900 000, оно внезапно будет уничтожено и будет 400 -> 1000 -> ... -> 900000 (поэтапно обновляясь, а не дожидаясь завершения импорта, затем замените его).

Я понятия не имею, почему он очищает наш индекс, поскольку предыдущие версии будут ждать, пока импорт не будет завершен перед заменой. Все наши настройки solrconfig одинаковы, поэтому я не уверен, что вызывает это. Любые идеи или что-то, что мне не хватает?

ответ

0

Найден виновник:

229 <!-- The default high-performance update handler --> 
230 <updateHandler class="solr.DirectUpdateHandler2"> 
231  <!-- AutoCommit 
232 
233   Perform a hard commit automatically under certain conditions. 
234   Instead of enabling autoCommit, consider using "commitWithin" 
235   when adding documents. 
236 
237   http://wiki.apache.org/solr/UpdateXmlMessages 
238 
239   maxDocs - Maximum number of documents to add since the last 
240     commit before automatically triggering a new commit. 
241 
242   maxTime - Maximum amount of time in ms that is allowed to pass 
243     since a document was added before automaticly 
244     triggering a new commit. 
245   openSearcher - if false, the commit causes recent index changes 
246   to be flushed to stable storage, but does not cause a new 
247   searcher to be opened to make those changes visible. 
248  --> 
249  <autoCommit> 
250  <maxTime>15000</maxTime> 
251  <openSearcher>false</openSearcher> 
252  </autoCommit> 
253 
254  <!-- softAutoCommit is like autoCommit except it causes a 
255   'soft' commit which only ensures that changes are visible 
256   but does not ensure that data is synced to disk. This is 
257   faster and more near-realtime friendly than a hard commit. 
258  --> 
259 
260  <autoSoftCommit> 
261  <maxTime>1000</maxTime> 
262  </autoSoftCommit> 

закомментировал разделы Autocommit и autosoftcommit и индекс не обновляется пошагово больше. Появляется это новый аргумент, добавленный в solr 4. Надеюсь, это поможет кому-то еще в будущем.

EDIT: Этот файл находится в файле SolrConfig/conf/solrconfig.xml.

Смежные вопросы