de.uplanet.lucy.server.searchengine
Class SearchEngine

java.lang.Object
  extended by de.uplanet.lucy.server.searchengine.SearchEngine

public final class SearchEngine
extends java.lang.Object

Version:
$Revision: 78444 $

Field Summary
static int DEFAULT_MIN_SEARCH_ITEM_LEN
          The default minimum search item length.
 
Method Summary
static SearchEngine createInstance(java.sql.Connection p_conn, de.uplanet.lucy.server.searchengine.SearchContext p_sctx)
          Create a search engine instance.
 void disableSecurity()
          Disables security checks.
 void done()
          Free all resources.
 void enableSecurity()
          Enables security checks.
 de.uplanet.lucy.server.searchengine.SearchResultHandle executeFileSearch(java.lang.String p_strQuery)
           
 de.uplanet.lucy.server.searchengine.SearchResultHandle executeSearch(java.lang.String p_strQuery)
          Executes a previously prepared search query with the given search expression.
 de.uplanet.lucy.server.searchengine.SearchContext getContext()
          Get the context associated with this search engine.
 int getMinimumSearchItemLength()
          Get the minimum length of a search item.
 java.util.List<de.uplanet.lucy.server.searchengine.SearchConfiguration> getSearchConfigurations()
           
 boolean isFileSearch()
           
 boolean isTagSearch()
           
 java.util.List<de.uplanet.lucy.server.searchengine.SearchConfiguration> listSearchConfigurations(ISearchConfigurationFilter p_filter)
           
 int prepareGlobalSearch()
          Prepare searching all applications.
 int prepareGlobalSearch(java.util.Collection<java.lang.String> p_includedApplications)
          Deprecated. Use prepareGlobalSearch(ISearchConfigurationFilter) instead.
 int prepareGlobalSearch(ISearchConfigurationFilter p_filter)
          Prepare searching applications.
 int prepareSearch(java.lang.String p_strAppGuid, java.lang.String p_strContext)
          Prepare searching the specified application.
 void setMinimumSearchItemLength(int p_iMinimumSearchItemLength)
          Set the minimum search item length.
 void setSearchTimeout(int p_iSeconds)
          Set the search timeout.
 boolean timeout()
          Test if the search timeout was reached.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_MIN_SEARCH_ITEM_LEN

public static final int DEFAULT_MIN_SEARCH_ITEM_LEN
The default minimum search item length.

See Also:
SearchQuery.DEFAULT_MIN_SEARCH_ITEM_LEN, Constant Field Values
Method Detail

createInstance

public static SearchEngine createInstance(java.sql.Connection p_conn,
                                          de.uplanet.lucy.server.searchengine.SearchContext p_sctx)
Create a search engine instance.


done

public void done()
Free all resources.


enableSecurity

public void enableSecurity()
Enables security checks. This is the default.


disableSecurity

public void disableSecurity()
Disables security checks.


getContext

public de.uplanet.lucy.server.searchengine.SearchContext getContext()
Get the context associated with this search engine.

Returns:
The search context.

setSearchTimeout

public void setSearchTimeout(int p_iSeconds)
Set the search timeout.

Parameters:
p_iSeconds - The timeout in seconds.

getMinimumSearchItemLength

public int getMinimumSearchItemLength()
Get the minimum length of a search item.

Returns:
The minimum search item length.

setMinimumSearchItemLength

public void setMinimumSearchItemLength(int p_iMinimumSearchItemLength)
Set the minimum search item length.

Parameters:
p_iMinimumSearchItemLength - The new minimum search item length.

timeout

public boolean timeout()
Test if the search timeout was reached.

Returns:
true iff a set timeout was reached.

isFileSearch

public boolean isFileSearch()
Returns:
true iff file search is enabled

isTagSearch

public boolean isTagSearch()
Returns:
true iff tags search is enabled

listSearchConfigurations

public java.util.List<de.uplanet.lucy.server.searchengine.SearchConfiguration> listSearchConfigurations(ISearchConfigurationFilter p_filter)

prepareSearch

public int prepareSearch(java.lang.String p_strAppGuid,
                         java.lang.String p_strContext)
Prepare searching the specified application.

Parameters:
p_strAppGuid - The unique identifier of the application.
p_strContext - A unique identifier that specifies the search context, usually a FUP GUID.
Returns:
The number of search queries that will actually be performend.

prepareGlobalSearch

public int prepareGlobalSearch()
Prepare searching all applications.

Returns:
The number of search queries that will actually be performend.

prepareGlobalSearch

@Deprecated
public int prepareGlobalSearch(java.util.Collection<java.lang.String> p_includedApplications)
Deprecated. Use prepareGlobalSearch(ISearchConfigurationFilter) instead.

Prepare searching applications.

Parameters:
A - collection of applications to be searched, or null if all applications should be searched.
Returns:
The number of search queries that will actually be performend.

prepareGlobalSearch

public int prepareGlobalSearch(ISearchConfigurationFilter p_filter)
Prepare searching applications.

Parameters:
A - collection of applications to be searched, or null if all applications should be searched.
Returns:
The number of search queries that will actually be performend.

getSearchConfigurations

public java.util.List<de.uplanet.lucy.server.searchengine.SearchConfiguration> getSearchConfigurations()

executeSearch

public de.uplanet.lucy.server.searchengine.SearchResultHandle executeSearch(java.lang.String p_strQuery)
Executes a previously prepared search query with the given search expression.

Parameters:
p_strQuery - The search expression to be used.
Returns:
A handle to the search results.

executeFileSearch

public de.uplanet.lucy.server.searchengine.SearchResultHandle executeFileSearch(java.lang.String p_strQuery)


Last updated: 2011-01-27
Copyright 2000-2010 United Planet. All Rights Reserved.