Liferay 6.0.5

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 addRequiredTerm(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)
           
 void delete(long companyId)
           
 void deleteDocuments(long companyId, org.apache.lucene.index.Term term)
           
 org.apache.lucene.analysis.Analyzer getAnalyzer()
           
 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)
           
 void shutdown()
           
 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

addRequiredTerm

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

addTerm

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

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

getAnalyzer

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

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

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

shutdown

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

Liferay 6.0.5