Liferay 6.2-ce-ga5

com.liferay.portal.kernel.search
Class SearchEngineUtil

java.lang.Object
  extended by com.liferay.portal.kernel.search.SearchEngineUtil

public class SearchEngineUtil
extends Object


Field Summary
static int ALL_POS
          Deprecated. As of 6.2.0, replaced by QueryUtil.ALL_POS
static String GENERIC_ENGINE_ID
           
static String SYSTEM_ENGINE_ID
           
 
Constructor Summary
SearchEngineUtil()
           
 
Method Summary
static void addDocument(long companyId, Document document)
          Deprecated. As of 6.2.0, replaced by addDocument(String, long, Document, boolean)
static void addDocument(String searchEngineId, long companyId, Document document)
          Deprecated. As of 7.0.0, replaced by addDocument(String, long, Document, boolean)
static void addDocument(String searchEngineId, long companyId, Document document, boolean commitImmediately)
           
static void addDocuments(long companyId, Collection<Document> documents)
          Deprecated. As of 6.2.0, replaced by addDocuments(String, long, Collection, boolean)
static void addDocuments(String searchEngineId, long companyId, Collection<Document> documents)
          Deprecated. As of 7.0.0, replaced by addDocuments(String, long, Collection, boolean)
static void addDocuments(String searchEngineId, long companyId, Collection<Document> documents, boolean commitImmediately)
           
static void addSearchEngine(SearchEngine searchEngine)
          Deprecated. As of 6.2.0, replaced by setSearchEngine(String, SearchEngine)
static void deleteDocument(long companyId, String uid)
          Deprecated. As of 6.2.0, replaced by deleteDocument(String, long, String)
static void deleteDocument(String searchEngineId, long companyId, String uid)
          Deprecated. As of 7.0.0, replaced by deleteDocument(String, long, String, boolean)
static void deleteDocument(String searchEngineId, long companyId, String uid, boolean commitImmediately)
           
static void deleteDocuments(long companyId, Collection<String> uids)
          Deprecated. As of 6.2.0, replaced by deleteDocuments(String, long, Collection, boolean)
static void deleteDocuments(String searchEngineId, long companyId, Collection<String> uids)
          Deprecated. As of 7.0.0, replaced by deleteDocuments(String, long, Collection, boolean)
static void deleteDocuments(String searchEngineId, long companyId, Collection<String> uids, boolean commitImmediately)
           
static void deletePortletDocuments(long companyId, String portletId)
          Deprecated. As of 6.2.0, replaced by deletePortletDocuments(String, long, String, boolean)
static void deletePortletDocuments(String searchEngineId, long companyId, String portletId)
          Deprecated. As of 7.0.0, replaced by deletePortletDocuments(String, long, String, boolean)
static void deletePortletDocuments(String searchEngineId, long companyId, String portletId, boolean commitImmediately)
           
static String getDefaultSearchEngineId()
           
static String[] getEntryClassNames()
           
static SearchEngine getSearchEngine()
          Deprecated. As of 6.2.0, replaced by getSearchEngine(String)
static SearchEngine getSearchEngine(String searchEngineId)
           
static String getSearchEngineId(Collection<Document> documents)
           
static String getSearchEngineId(Document document)
           
static Set<String> getSearchEngineIds()
           
static SearchEngine getSearchEngineSilent(String searchEngineId)
           
static SearchPermissionChecker getSearchPermissionChecker()
           
static String getSearchReaderDestinationName(String searchEngineId)
           
static String getSearchWriterDestinationName(String searchEngineId)
           
static void indexKeyword(long companyId, String querySuggestion, float weight, String keywordType, Locale locale)
           
static void indexKeyword(String searchEngineId, long companyId, String querySuggestion, float weight, String keywordType, Locale locale)
           
static void indexQuerySuggestionDictionaries(long companyId)
           
static void indexQuerySuggestionDictionaries(String searchEngineId, long companyId)
           
static void indexQuerySuggestionDictionary(long companyId, Locale locale)
           
static void indexQuerySuggestionDictionary(String searchEngineId, long companyId, Locale locale)
           
static void indexSpellCheckerDictionaries(long companyId)
           
static void indexSpellCheckerDictionaries(String searchEngineId, long companyId)
           
static void indexSpellCheckerDictionary(long companyId, Locale locale)
           
static void indexSpellCheckerDictionary(String searchEngineId, long companyId, Locale locale)
           
static boolean isIndexReadOnly()
           
static SearchEngine removeSearchEngine(String searchEngineId)
           
static Hits search(long companyId, long[] groupIds, long userId, String className, Query query, int start, int end)
          Deprecated. As of 6.2.0
static Hits search(long companyId, long[] groupIds, long userId, String className, Query query, Sort[] sorts, int start, int end)
          Deprecated. As of 6.2.0
static Hits search(long companyId, long[] groupIds, long userId, String className, Query query, Sort sort, int start, int end)
          Deprecated. As of 6.2.0
static Hits search(long companyId, Query query, int start, int end)
          Deprecated. As of 6.2.0, replaced by search(String, long, Query, int, int)
static Hits search(long companyId, Query query, Sort[] sorts, int start, int end)
          Deprecated. As of 6.2.0, replaced by search(String, long, Query, Sort[], int, int)
static Hits search(long companyId, Query query, Sort sort, int start, int end)
          Deprecated. As of 6.2.0, replaced by search(String, long, Query, Sort, int, int)
static Hits search(SearchContext searchContext, Query query)
           
static Hits search(String searchEngineId, long companyId, Query query, int start, int end)
           
static Hits search(String searchEngineId, long companyId, Query query, Sort[] sorts, int start, int end)
           
static Hits search(String searchEngineId, long companyId, Query query, Sort sort, int start, int end)
           
static void setDefaultSearchEngineId(String defaultSearchEngineId)
           
 void setExcludedEntryClassNames(List<String> excludedEntryClassNames)
           
static void setIndexReadOnly(boolean indexReadOnly)
           
 void setSearchEngine(SearchEngine searchEngine)
          Deprecated. As of 6.2.0, replaced by setSearchEngine(String, SearchEngine)
static void setSearchEngine(String searchEngineId, SearchEngine searchEngine)
           
 void setSearchPermissionChecker(SearchPermissionChecker searchPermissionChecker)
           
static String spellCheckKeywords(SearchContext searchContext)
           
static Map<String,List<String>> spellCheckKeywords(SearchContext searchContext, int max)
           
static String[] suggestKeywordQueries(SearchContext searchContext, int max)
           
static void updateDocument(long companyId, Document document)
          Deprecated. As of 6.2.0, replaced by updateDocument(String, long, Document)
static void updateDocument(String searchEngineId, long companyId, Document document)
          Deprecated. As of 7.0.0, replaced by updateDocument(String, long, Document, boolean)
static void updateDocument(String searchEngineId, long companyId, Document document, boolean commitImmediately)
           
static void updateDocuments(long companyId, Collection<Document> documents)
          Deprecated. As of 6.2.0, replaced by updateDocuments(String, long, Collection)
static void updateDocuments(String searchEngineId, long companyId, Collection<Document> documents)
          Deprecated. As of 7.0.0, replaced by updateDocuments(String, long, Collection, boolean)
static void updateDocuments(String searchEngineId, long companyId, Collection<Document> documents, boolean commitImmediately)
           
static void updatePermissionFields(String name, String primKey)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALL_POS

public static final int ALL_POS
Deprecated. As of 6.2.0, replaced by QueryUtil.ALL_POS
See Also:
Constant Field Values

GENERIC_ENGINE_ID

public static final String GENERIC_ENGINE_ID
See Also:
Constant Field Values

SYSTEM_ENGINE_ID

public static final String SYSTEM_ENGINE_ID
See Also:
Constant Field Values
Constructor Detail

SearchEngineUtil

public SearchEngineUtil()
Method Detail

addDocument

public static void addDocument(long companyId,
                               Document document)
                        throws SearchException
Deprecated. As of 6.2.0, replaced by addDocument(String, long, Document, boolean)

Throws:
SearchException

addDocument

@Deprecated
public static void addDocument(String searchEngineId,
                                          long companyId,
                                          Document document)
                        throws SearchException
Deprecated. As of 7.0.0, replaced by addDocument(String, long, Document, boolean)

Throws:
SearchException

addDocument

public static void addDocument(String searchEngineId,
                               long companyId,
                               Document document,
                               boolean commitImmediately)
                        throws SearchException
Throws:
SearchException

addDocuments

public static void addDocuments(long companyId,
                                Collection<Document> documents)
                         throws SearchException
Deprecated. As of 6.2.0, replaced by addDocuments(String, long, Collection, boolean)

Throws:
SearchException

addDocuments

@Deprecated
public static void addDocuments(String searchEngineId,
                                           long companyId,
                                           Collection<Document> documents)
                         throws SearchException
Deprecated. As of 7.0.0, replaced by addDocuments(String, long, Collection, boolean)

Throws:
SearchException

addDocuments

public static void addDocuments(String searchEngineId,
                                long companyId,
                                Collection<Document> documents,
                                boolean commitImmediately)
                         throws SearchException
Throws:
SearchException

addSearchEngine

public static void addSearchEngine(SearchEngine searchEngine)
Deprecated. As of 6.2.0, replaced by setSearchEngine(String, SearchEngine)


deleteDocument

public static void deleteDocument(long companyId,
                                  String uid)
                           throws SearchException
Deprecated. As of 6.2.0, replaced by deleteDocument(String, long, String)

Throws:
SearchException

deleteDocument

@Deprecated
public static void deleteDocument(String searchEngineId,
                                             long companyId,
                                             String uid)
                           throws SearchException
Deprecated. As of 7.0.0, replaced by deleteDocument(String, long, String, boolean)

Throws:
SearchException

deleteDocument

public static void deleteDocument(String searchEngineId,
                                  long companyId,
                                  String uid,
                                  boolean commitImmediately)
                           throws SearchException
Throws:
SearchException

deleteDocuments

public static void deleteDocuments(long companyId,
                                   Collection<String> uids)
                            throws SearchException
Deprecated. As of 6.2.0, replaced by deleteDocuments(String, long, Collection, boolean)

Throws:
SearchException

deleteDocuments

@Deprecated
public static void deleteDocuments(String searchEngineId,
                                              long companyId,
                                              Collection<String> uids)
                            throws SearchException
Deprecated. As of 7.0.0, replaced by deleteDocuments(String, long, Collection, boolean)

Throws:
SearchException

deleteDocuments

public static void deleteDocuments(String searchEngineId,
                                   long companyId,
                                   Collection<String> uids,
                                   boolean commitImmediately)
                            throws SearchException
Throws:
SearchException

deletePortletDocuments

public static void deletePortletDocuments(long companyId,
                                          String portletId)
                                   throws SearchException
Deprecated. As of 6.2.0, replaced by deletePortletDocuments(String, long, String, boolean)

Throws:
SearchException

deletePortletDocuments

@Deprecated
public static void deletePortletDocuments(String searchEngineId,
                                                     long companyId,
                                                     String portletId)
                                   throws SearchException
Deprecated. As of 7.0.0, replaced by deletePortletDocuments(String, long, String, boolean)

Throws:
SearchException

deletePortletDocuments

public static void deletePortletDocuments(String searchEngineId,
                                          long companyId,
                                          String portletId,
                                          boolean commitImmediately)
                                   throws SearchException
Throws:
SearchException

getDefaultSearchEngineId

public static String getDefaultSearchEngineId()

getEntryClassNames

public static String[] getEntryClassNames()

getSearchEngine

public static SearchEngine getSearchEngine()
Deprecated. As of 6.2.0, replaced by getSearchEngine(String)


getSearchEngine

public static SearchEngine getSearchEngine(String searchEngineId)

getSearchEngineId

public static String getSearchEngineId(Collection<Document> documents)

getSearchEngineId

public static String getSearchEngineId(Document document)

getSearchEngineIds

public static Set<String> getSearchEngineIds()

getSearchEngineSilent

public static SearchEngine getSearchEngineSilent(String searchEngineId)

getSearchPermissionChecker

public static SearchPermissionChecker getSearchPermissionChecker()

getSearchReaderDestinationName

public static String getSearchReaderDestinationName(String searchEngineId)

getSearchWriterDestinationName

public static String getSearchWriterDestinationName(String searchEngineId)

indexKeyword

public static void indexKeyword(long companyId,
                                String querySuggestion,
                                float weight,
                                String keywordType,
                                Locale locale)
                         throws SearchException
Throws:
SearchException

indexKeyword

public static void indexKeyword(String searchEngineId,
                                long companyId,
                                String querySuggestion,
                                float weight,
                                String keywordType,
                                Locale locale)
                         throws SearchException
Throws:
SearchException

indexQuerySuggestionDictionaries

public static void indexQuerySuggestionDictionaries(long companyId)
                                             throws SearchException
Throws:
SearchException

indexQuerySuggestionDictionaries

public static void indexQuerySuggestionDictionaries(String searchEngineId,
                                                    long companyId)
                                             throws SearchException
Throws:
SearchException

indexQuerySuggestionDictionary

public static void indexQuerySuggestionDictionary(long companyId,
                                                  Locale locale)
                                           throws SearchException
Throws:
SearchException

indexQuerySuggestionDictionary

public static void indexQuerySuggestionDictionary(String searchEngineId,
                                                  long companyId,
                                                  Locale locale)
                                           throws SearchException
Throws:
SearchException

indexSpellCheckerDictionaries

public static void indexSpellCheckerDictionaries(long companyId)
                                          throws SearchException
Throws:
SearchException

indexSpellCheckerDictionaries

public static void indexSpellCheckerDictionaries(String searchEngineId,
                                                 long companyId)
                                          throws SearchException
Throws:
SearchException

indexSpellCheckerDictionary

public static void indexSpellCheckerDictionary(long companyId,
                                               Locale locale)
                                        throws SearchException
Throws:
SearchException

indexSpellCheckerDictionary

public static void indexSpellCheckerDictionary(String searchEngineId,
                                               long companyId,
                                               Locale locale)
                                        throws SearchException
Throws:
SearchException

isIndexReadOnly

public static boolean isIndexReadOnly()

removeSearchEngine

public static SearchEngine removeSearchEngine(String searchEngineId)

search

public static Hits search(long companyId,
                          long[] groupIds,
                          long userId,
                          String className,
                          Query query,
                          int start,
                          int end)
                   throws SearchException
Deprecated. As of 6.2.0

Throws:
SearchException

search

public static Hits search(long companyId,
                          long[] groupIds,
                          long userId,
                          String className,
                          Query query,
                          Sort sort,
                          int start,
                          int end)
                   throws SearchException
Deprecated. As of 6.2.0

Throws:
SearchException

search

public static Hits search(long companyId,
                          long[] groupIds,
                          long userId,
                          String className,
                          Query query,
                          Sort[] sorts,
                          int start,
                          int end)
                   throws SearchException
Deprecated. As of 6.2.0

Throws:
SearchException

search

public static Hits search(long companyId,
                          Query query,
                          int start,
                          int end)
                   throws SearchException
Deprecated. As of 6.2.0, replaced by search(String, long, Query, int, int)

Throws:
SearchException

search

public static Hits search(long companyId,
                          Query query,
                          Sort sort,
                          int start,
                          int end)
                   throws SearchException
Deprecated. As of 6.2.0, replaced by search(String, long, Query, Sort, int, int)

Throws:
SearchException

search

public static Hits search(long companyId,
                          Query query,
                          Sort[] sorts,
                          int start,
                          int end)
                   throws SearchException
Deprecated. As of 6.2.0, replaced by search(String, long, Query, Sort[], int, int)

Throws:
SearchException

search

public static Hits search(SearchContext searchContext,
                          Query query)
                   throws SearchException
Throws:
SearchException

search

public static Hits search(String searchEngineId,
                          long companyId,
                          Query query,
                          int start,
                          int end)
                   throws SearchException
Throws:
SearchException

search

public static Hits search(String searchEngineId,
                          long companyId,
                          Query query,
                          Sort sort,
                          int start,
                          int end)
                   throws SearchException
Throws:
SearchException

search

public static Hits search(String searchEngineId,
                          long companyId,
                          Query query,
                          Sort[] sorts,
                          int start,
                          int end)
                   throws SearchException
Throws:
SearchException

setDefaultSearchEngineId

public static void setDefaultSearchEngineId(String defaultSearchEngineId)

setIndexReadOnly

public static void setIndexReadOnly(boolean indexReadOnly)

setSearchEngine

public static void setSearchEngine(String searchEngineId,
                                   SearchEngine searchEngine)

spellCheckKeywords

public static String spellCheckKeywords(SearchContext searchContext)
                                 throws SearchException
Throws:
SearchException

spellCheckKeywords

public static Map<String,List<String>> spellCheckKeywords(SearchContext searchContext,
                                                          int max)
                                                   throws SearchException
Throws:
SearchException

suggestKeywordQueries

public static String[] suggestKeywordQueries(SearchContext searchContext,
                                             int max)
                                      throws SearchException
Throws:
SearchException

updateDocument

public static void updateDocument(long companyId,
                                  Document document)
                           throws SearchException
Deprecated. As of 6.2.0, replaced by updateDocument(String, long, Document)

Throws:
SearchException

updateDocument

@Deprecated
public static void updateDocument(String searchEngineId,
                                             long companyId,
                                             Document document)
                           throws SearchException
Deprecated. As of 7.0.0, replaced by updateDocument(String, long, Document, boolean)

Throws:
SearchException

updateDocument

public static void updateDocument(String searchEngineId,
                                  long companyId,
                                  Document document,
                                  boolean commitImmediately)
                           throws SearchException
Throws:
SearchException

updateDocuments

public static void updateDocuments(long companyId,
                                   Collection<Document> documents)
                            throws SearchException
Deprecated. As of 6.2.0, replaced by updateDocuments(String, long, Collection)

Throws:
SearchException

updateDocuments

@Deprecated
public static void updateDocuments(String searchEngineId,
                                              long companyId,
                                              Collection<Document> documents)
                            throws SearchException
Deprecated. As of 7.0.0, replaced by updateDocuments(String, long, Collection, boolean)

Throws:
SearchException

updateDocuments

public static void updateDocuments(String searchEngineId,
                                   long companyId,
                                   Collection<Document> documents,
                                   boolean commitImmediately)
                            throws SearchException
Throws:
SearchException

updatePermissionFields

public static void updatePermissionFields(String name,
                                          String primKey)

setExcludedEntryClassNames

public void setExcludedEntryClassNames(List<String> excludedEntryClassNames)

setSearchEngine

public void setSearchEngine(SearchEngine searchEngine)
Deprecated. As of 6.2.0, replaced by setSearchEngine(String, SearchEngine)


setSearchPermissionChecker

public void setSearchPermissionChecker(SearchPermissionChecker searchPermissionChecker)

Liferay 6.2-ce-ga5