org.apache.solr.update
Class SolrIndexWriter

java.lang.Object
  extended by org.apache.lucene.index.IndexWriter
      extended by org.apache.solr.update.SolrIndexWriter
All Implemented Interfaces:
Closeable, TwoPhaseCommit

public class SolrIndexWriter
extends IndexWriter

An IndexWriter that is configured via Solr config mechanisms.

Since:
solr 0.9

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.lucene.index.IndexWriter
IndexWriter.IndexReaderWarmer
 
Field Summary
static String COMMIT_TIME_MSEC_KEY
          Stored into each Lucene commit to record the System.currentTimeMillis() when commit was called.
static AtomicLong numCloses
           
static AtomicLong numOpens
           
 
Fields inherited from class org.apache.lucene.index.IndexWriter
MAX_TERM_LENGTH, WRITE_LOCK_NAME
 
Constructor Summary
SolrIndexWriter(String name, String path, DirectoryFactory directoryFactory, boolean create, IndexSchema schema, SolrIndexConfig config, IndexDeletionPolicy delPolicy, Codec codec, boolean forceNewDirectory)
           
 
Method Summary
 void close()
           
protected  void finalize()
           
 void rollback()
           
 
Methods inherited from class org.apache.lucene.index.IndexWriter
addDocument, addDocument, addDocuments, addDocuments, addIndexes, addIndexes, close, commit, commit, deleteAll, deleteDocuments, deleteDocuments, deleteDocuments, deleteDocuments, deleteUnusedFiles, doAfterFlush, doBeforeFlush, ensureOpen, ensureOpen, flush, forceMerge, forceMerge, forceMergeDeletes, forceMergeDeletes, getAnalyzer, getConfig, getDirectory, getMergingSegments, getNextMerge, getPayloadProcessorProvider, hasDeletions, isLocked, maxDoc, maybeMerge, merge, numDeletedDocs, numDocs, numRamDocs, prepareCommit, prepareCommit, ramSizeInBytes, segString, segString, segString, setPayloadProcessorProvider, unlock, updateDocument, updateDocument, updateDocuments, updateDocuments, waitForMerges
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

numOpens

public static final AtomicLong numOpens

numCloses

public static final AtomicLong numCloses

COMMIT_TIME_MSEC_KEY

public static final String COMMIT_TIME_MSEC_KEY
Stored into each Lucene commit to record the System.currentTimeMillis() when commit was called.

See Also:
Constant Field Values
Constructor Detail

SolrIndexWriter

public SolrIndexWriter(String name,
                       String path,
                       DirectoryFactory directoryFactory,
                       boolean create,
                       IndexSchema schema,
                       SolrIndexConfig config,
                       IndexDeletionPolicy delPolicy,
                       Codec codec,
                       boolean forceNewDirectory)
                throws IOException
Throws:
IOException
Method Detail

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class IndexWriter
Throws:
IOException

rollback

public void rollback()
              throws IOException
Specified by:
rollback in interface TwoPhaseCommit
Overrides:
rollback in class IndexWriter
Throws:
IOException

finalize

protected void finalize()
                 throws Throwable
Overrides:
finalize in class Object
Throws:
Throwable


Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.