com.elasticpath.persistence
Interface IndexWriter

All Known Implementing Classes:
IndexWriterImpl

public interface IndexWriter

Represents an index writer.


Method Summary
 void addDocument(org.apache.lucene.document.Document document)
          Adds the given document to index.
 void close()
          Close the index writer.
 void deleteDocument(long uid)
          Deletes the document specified by the uid.
 void deleteDocument(java.lang.String uid)
          Deletes the document specified by the uid.
 void flush()
          Flush the changes.
 void open(java.util.Locale locale, boolean recreate)
          Open the index writer with the given locale.
 void open(java.lang.String indexDir, java.util.Locale locale, boolean recreate)
          Open the index writer with the given locale at the given directory.
 void updateDocument(org.apache.lucene.document.Document document)
          Updates the document in the index.
 

Method Detail

addDocument

void addDocument(org.apache.lucene.document.Document document)
Adds the given document to index.

Parameters:
document - the document to add into index

close

void close()
Close the index writer.


deleteDocument

void deleteDocument(long uid)
Deletes the document specified by the uid.

Parameters:
uid - the uid of the object

deleteDocument

void deleteDocument(java.lang.String uid)
Deletes the document specified by the uid.

Parameters:
uid - the uid of the object

flush

void flush()
Flush the changes.


open

void open(java.util.Locale locale,
          boolean recreate)
Open the index writer with the given locale.

Parameters:
locale - the locale
recreate - set this to true if you want to recreate the index.

open

void open(java.lang.String indexDir,
          java.util.Locale locale,
          boolean recreate)
Open the index writer with the given locale at the given directory.

Parameters:
indexDir - the index directory
locale - the locale
recreate - set this to true if you want to recreate the index.

updateDocument

void updateDocument(org.apache.lucene.document.Document document)
Updates the document in the index.

Parameters:
document - the document to update in the index