Liferay 6.2-ce-ga5

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, Integer startValue, Integer endValue)
           
 void addNumericRangeTerm(org.apache.lucene.search.BooleanQuery booleanQuery, String field, Long startValue, Long endValue)
           
 void addNumericRangeTerm(org.apache.lucene.search.BooleanQuery booleanQuery, String field, String startValue, String endValue)
          Deprecated. As of 6.2.0, replaced by addNumericRangeTerm(BooleanQuery, String, Long, Long)
 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)
           
 void cleanUp(org.apache.lucene.search.IndexSearcher indexSearcher)
          Deprecated. As of 7.0.0, replaced by releaseIndexSearcher(long, IndexSearcher)
 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()
           
 IndexAccessor getIndexAccessor(long companyId)
           
 org.apache.lucene.search.IndexSearcher getIndexSearcher(long companyId)
           
 long getLastGeneration(long companyId)
           
 InputStream getLoadIndexesInputStreamFromCluster(long companyId, Address bootupAddress)
           
 Set<String> getQueryTerms(org.apache.lucene.search.Query query)
           
 org.apache.lucene.search.IndexSearcher getSearcher(long companyId, boolean readOnly)
          Deprecated. As of 7.0.0, replaced by getIndexSearcher(long)
 String getSnippet(org.apache.lucene.search.Query query, String field, String s, int maxNumFragments, int fragmentLength, String fragmentSuffix, org.apache.lucene.search.highlight.Formatter formatter)
           
 org.apache.lucene.util.Version getVersion()
           
 boolean isLoadIndexFromClusterEnabled()
           
 void loadIndex(long companyId, InputStream inputStream)
           
 void loadIndexesFromCluster(long companyId)
           
 void releaseIndexSearcher(long companyId, org.apache.lucene.search.IndexSearcher indexSearcher)
           
 void setAnalyzer(org.apache.lucene.analysis.Analyzer analyzer)
           
 void setVersion(org.apache.lucene.util.Version version)
           
 void shutdown()
           
 void shutdown(long companyId)
           
 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,
                                Integer startValue,
                                Integer endValue)
Specified by:
addNumericRangeTerm in interface LuceneHelper

addNumericRangeTerm

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

addNumericRangeTerm

public void addNumericRangeTerm(org.apache.lucene.search.BooleanQuery booleanQuery,
                                String field,
                                String startValue,
                                String endValue)
Deprecated. As of 6.2.0, replaced by addNumericRangeTerm(BooleanQuery, String, Long, Long)

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

cleanUp

@Deprecated
public void cleanUp(org.apache.lucene.search.IndexSearcher indexSearcher)
Deprecated. As of 7.0.0, replaced by releaseIndexSearcher(long, IndexSearcher)

Specified by:
cleanUp 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

getIndexAccessor

public IndexAccessor getIndexAccessor(long companyId)
Specified by:
getIndexAccessor in interface LuceneHelper

getIndexSearcher

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

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 Set<String> getQueryTerms(org.apache.lucene.search.Query query)
Specified by:
getQueryTerms in interface LuceneHelper

getSearcher

@Deprecated
public org.apache.lucene.search.IndexSearcher getSearcher(long companyId,
                                                                     boolean readOnly)
                                                   throws IOException
Deprecated. As of 7.0.0, replaced by getIndexSearcher(long)

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,
                         org.apache.lucene.search.highlight.Formatter formatter)
                  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

releaseIndexSearcher

public void releaseIndexSearcher(long companyId,
                                 org.apache.lucene.search.IndexSearcher indexSearcher)
                          throws IOException
Specified by:
releaseIndexSearcher in interface LuceneHelper
Throws:
IOException

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

shutdown

public void shutdown(long companyId)
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.2-ce-ga5