| DirectUpdateHandler2 implements an UpdateHandler where documents are added
directly to the main Lucene index as opposed to adding to a separate smaller index.
For this reason, not all combinations to/from pending and committed are supported.
This version supports efficient removal of duplicates on a commit. It works by maintaining
a related count for every document being added or deleted. At commit time, for every id with a count,
all but the last "count" docs with that id are deleted.
Supported add command parameters:
allowDups |
overwritePending |
overwriteCommitted |
efficiency |
false |
false |
true |
fast |
true or false |
true |
true |
fast |
true |
false |
false |
fastest |
Supported delete commands:
command |
fromPending |
fromCommitted |
efficiency |
delete |
true |
true |
fast |
deleteByQuery |
true |
true |
very slow* |
* deleteByQuery causes a commit to happen (close current index writer, open new index reader)
before it can be processed. If deleteByQuery functionality is needed, it's best if they can
be batched and executed together so they may share the same index reader.
author: yonik version: $Id: DirectUpdateHandler2.java 542679 2007-05-29 22:28:21Z ryan $ since: solr 0.9 |