Liferay 6.1.2-ce-ga3

com.liferay.portal.search.lucene
Class LuceneHelperImpl

java.lang.Object
  extended by com.liferay.portal.search.lucene.LuceneHelperImpl
All Implemented Interfaces:
LuceneHelper

public class LuceneHelperImpl
extends Object
implements LuceneHelper


Method Summary
 void addDocument(long companyId, org.apache.lucene.document.Document document)
           
 void addExactTerm(org.apache.lucene.search.BooleanQuery booleanQuery, String field, String value)
           
 void addNumericRangeTerm(org.apache.lucene.search.BooleanQuery booleanQuery, String field, String startValue, String endValue)
           
 void addRangeTerm(org.apache.lucene.search.BooleanQuery booleanQuery, String field, String startValue, String endValue)
           
 void addRequiredTerm(org.apache.lucene.search.BooleanQuery booleanQuery, String field, String[] values, boolean like)
           
 void addRequiredTerm(org.apache.lucene.search.BooleanQuery booleanQuery, String field, String value, boolean like)
           
 void addTerm(org.apache.lucene.search.BooleanQuery booleanQuery, String field, String[] values, boolean like)
           
 void addTerm(org.apache.lucene.search.BooleanQuery booleanQuery, String field, String value, boolean like)
           
 void addTerm(org.apache.lucene.search.BooleanQuery booleanQuery, String field, String value, boolean like, BooleanClauseOccur booleanClauseOccur)
           
 int countScoredFieldNames(org.apache.lucene.search.Query query, String[] filedNames)
           
 void delete(long companyId)
           
 void deleteDocuments(long companyId, org.apache.lucene.index.Term term)
           
 void dumpIndex(long companyId, OutputStream outputStream)
           
 org.apache.lucene.analysis.Analyzer getAnalyzer()
           
 long getLastGeneration(long companyId)
           
 InputStream getLoadIndexesInputStreamFromCluster(long companyId, Address bootupAddress)
           
 String[] getQueryTerms(org.apache.lucene.search.Query query)
           
 org.apache.lucene.search.IndexSearcher getSearcher(long companyId, boolean readOnly)
           
 String getSnippet(org.apache.lucene.search.Query query, String field, String s, int maxNumFragments, int fragmentLength, String fragmentSuffix, String preTag, String postTag)
           
 org.apache.lucene.util.Version getVersion()
           
 boolean isLoadIndexFromClusterEnabled()
           
 void loadIndex(long companyId, InputStream inputStream)
           
 void loadIndexesFromCluster(long companyId)
           
 void setAnalyzer(org.apache.lucene.analysis.Analyzer analyzer)
           
 void setVersion(org.apache.lucene.util.Version version)
           
 void shutdown()
           
 void startup(long companyId)
           
 void updateDocument(long companyId, org.apache.lucene.index.Term term, org.apache.lucene.document.Document document)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addDocument

public void addDocument(long companyId,
                        org.apache.lucene.document.Document document)
                 throws IOException
Specified by:
addDocument in interface LuceneHelper
Throws:
IOException

addExactTerm

public void addExactTerm(org.apache.lucene.search.BooleanQuery booleanQuery,
                         String field,
                         String value)
Specified by:
addExactTerm in interface LuceneHelper

addNumericRangeTerm

public void addNumericRangeTerm(org.apache.lucene.search.BooleanQuery booleanQuery,
                                String field,
                                String startValue,
                                String endValue)
Specified by:
addNumericRangeTerm in interface LuceneHelper

addRangeTerm

public void addRangeTerm(org.apache.lucene.search.BooleanQuery booleanQuery,
                         String field,
                         String startValue,
                         String endValue)
Specified by:
addRangeTerm in interface LuceneHelper

addRequiredTerm

public void addRequiredTerm(org.apache.lucene.search.BooleanQuery booleanQuery,
                            String field,
                            String value,
                            boolean like)
Specified by:
addRequiredTerm in interface LuceneHelper

addRequiredTerm

public void addRequiredTerm(org.apache.lucene.search.BooleanQuery booleanQuery,
                            String field,
                            String[] values,
                            boolean like)
Specified by:
addRequiredTerm in interface LuceneHelper

addTerm

public void addTerm(org.apache.lucene.search.BooleanQuery booleanQuery,
                    String field,
                    String value,
                    boolean like)
Specified by:
addTerm in interface LuceneHelper

addTerm

public void addTerm(org.apache.lucene.search.BooleanQuery booleanQuery,
                    String field,
                    String value,
                    boolean like,
                    BooleanClauseOccur booleanClauseOccur)
Specified by:
addTerm in interface LuceneHelper

addTerm

public void addTerm(org.apache.lucene.search.BooleanQuery booleanQuery,
                    String field,
                    String[] values,
                    boolean like)
Specified by:
addTerm in interface LuceneHelper

countScoredFieldNames

public int countScoredFieldNames(org.apache.lucene.search.Query query,
                                 String[] filedNames)
Specified by:
countScoredFieldNames in interface LuceneHelper

delete

public void delete(long companyId)
Specified by:
delete in interface LuceneHelper

deleteDocuments

public void deleteDocuments(long companyId,
                            org.apache.lucene.index.Term term)
                     throws IOException
Specified by:
deleteDocuments in interface LuceneHelper
Throws:
IOException

dumpIndex

public void dumpIndex(long companyId,
                      OutputStream outputStream)
               throws IOException
Specified by:
dumpIndex in interface LuceneHelper
Throws:
IOException

getAnalyzer

public org.apache.lucene.analysis.Analyzer getAnalyzer()
Specified by:
getAnalyzer in interface LuceneHelper

getLastGeneration

public long getLastGeneration(long companyId)
Specified by:
getLastGeneration in interface LuceneHelper

getLoadIndexesInputStreamFromCluster

public InputStream getLoadIndexesInputStreamFromCluster(long companyId,
                                                        Address bootupAddress)
                                                 throws SystemException
Specified by:
getLoadIndexesInputStreamFromCluster in interface LuceneHelper
Throws:
SystemException

getQueryTerms

public String[] getQueryTerms(org.apache.lucene.search.Query query)
Specified by:
getQueryTerms in interface LuceneHelper

getSearcher

public org.apache.lucene.search.IndexSearcher getSearcher(long companyId,
                                                          boolean readOnly)
                                                   throws IOException
Specified by:
getSearcher in interface LuceneHelper
Throws:
IOException

getSnippet

public String getSnippet(org.apache.lucene.search.Query query,
                         String field,
                         String s,
                         int maxNumFragments,
                         int fragmentLength,
                         String fragmentSuffix,
                         String preTag,
                         String postTag)
                  throws IOException
Specified by:
getSnippet in interface LuceneHelper
Throws:
IOException

getVersion

public org.apache.lucene.util.Version getVersion()
Specified by:
getVersion in interface LuceneHelper

isLoadIndexFromClusterEnabled

public boolean isLoadIndexFromClusterEnabled()
Specified by:
isLoadIndexFromClusterEnabled in interface LuceneHelper

loadIndex

public void loadIndex(long companyId,
                      InputStream inputStream)
               throws IOException
Specified by:
loadIndex in interface LuceneHelper
Throws:
IOException

loadIndexesFromCluster

public void loadIndexesFromCluster(long companyId)
                            throws SystemException
Specified by:
loadIndexesFromCluster in interface LuceneHelper
Throws:
SystemException

setAnalyzer

public void setAnalyzer(org.apache.lucene.analysis.Analyzer analyzer)

setVersion

public void setVersion(org.apache.lucene.util.Version version)

shutdown

public void shutdown()
Specified by:
shutdown in interface LuceneHelper

startup

public void startup(long companyId)
Specified by:
startup in interface LuceneHelper

updateDocument

public void updateDocument(long companyId,
                           org.apache.lucene.index.Term term,
                           org.apache.lucene.document.Document document)
                    throws IOException
Specified by:
updateDocument in interface LuceneHelper
Throws:
IOException

Liferay 6.1.2-ce-ga3