|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.elasticpath.persistence.impl.IndexWriterImpl
public class IndexWriterImpl
A default implementation of IndexWriter
.
Constructor Summary | |
---|---|
IndexWriterImpl()
|
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 |
setElasticPath(ElasticPath elasticPath)
Set the ElasticPath instance. |
void |
setIndexDirectory(java.lang.String indexDirectory)
Set the name of index directory. |
void |
updateDocument(org.apache.lucene.document.Document document)
Updates the document in the index. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IndexWriterImpl()
Method Detail |
---|
public void addDocument(org.apache.lucene.document.Document document)
addDocument
in interface IndexWriter
document
- the document to add into indexpublic void close()
close
in interface IndexWriter
public void deleteDocument(long uid)
deleteDocument
in interface IndexWriter
uid
- the uid of the objectpublic void deleteDocument(java.lang.String uid)
deleteDocument
in interface IndexWriter
uid
- the uid of the objectpublic void flush()
flush
in interface IndexWriter
public void open(java.util.Locale locale, boolean recreate)
open
in interface IndexWriter
locale
- the localerecreate
- set this to true
if you want to recreate the index.public void open(java.lang.String indexDir, java.util.Locale locale, boolean recreate)
open
in interface IndexWriter
indexDir
- the index directorylocale
- the localerecreate
- set this to true
if you want to recreate the index.public void setElasticPath(ElasticPath elasticPath)
ElasticPath
instance.
elasticPath
- the instance of ElasticPath
public void setIndexDirectory(java.lang.String indexDirectory)
indexDirectory
- the directory containing the index filepublic void updateDocument(org.apache.lucene.document.Document document)
updateDocument
in interface IndexWriter
document
- the document to update in the index
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |