001
014
015 package com.liferay.portal.search.lucene;
016
017 import java.io.IOException;
018 import java.io.InputStream;
019 import java.io.OutputStream;
020
021 import java.util.Collection;
022
023 import org.apache.lucene.document.Document;
024 import org.apache.lucene.index.Term;
025 import org.apache.lucene.store.Directory;
026
027
031 public interface IndexAccessor {
032
033 public static final long DEFAULT_LAST_GENERATION = -1;
034
035 public void addDocument(Document document) throws IOException;
036
037 public void addDocuments(Collection<Document> documents) throws IOException;
038
039 public void close();
040
041 public void delete();
042
043 public void deleteDocuments(Term term) throws IOException;
044
045 public void dumpIndex(OutputStream outputStream) throws IOException;
046
047 public long getCompanyId();
048
049 public long getLastGeneration();
050
051 public Directory getLuceneDir();
052
053 public void loadIndex(InputStream inputStream) throws IOException;
054
055 public void updateDocument(Term term, Document document) throws IOException;
056
057 }