atg.search.client
Interface SearchClient


public interface SearchClient

ATG Search client. Entrypoint for client searches.


Field Summary
static java.lang.String APPSERVER_TYPE
          property name for the type of appserver/server connection (rmi or local)
static java.lang.String CLASS_VERSION
          Class version string
static java.lang.String HOSTNAME
          property name for the server's hostname; only for rmi
static java.lang.String PORT
          property name for the host's rmi port; only for rmi
static java.lang.String RMI_COMPONENT_PATH
          property name for the host's rmi component path; only for rmi
 
Method Summary
 atg.search.client.SearchSession beginSession()
          Begins the user search session.
 java.util.Collection getSearchEnvironmentTargets()
           
 atg.search.events.SearchMessageTools getSearchMessageService()
           
 boolean isFiringSearchEvents()
           
 boolean isLiveIndexingSupported(java.lang.String pEnvironmentName)
          Indicates whether live indexing is supported for the environment.
 boolean isLiveSearchingSupported(java.lang.String pEnvironmentName)
          Indicates whether live searching is supported for the environment.
 boolean isUseSmallReportingResponse()
           
 void reset()
          Resets the client's connection.
 BrowseRequest.Response search(BrowseRequest request, atg.search.client.SearchSession searchSession)
          Submits a BrowseRequest and returns a BrowseRequest.Response.
 CategorizeRequest.Response search(CategorizeRequest request, atg.search.client.SearchSession searchSession)
          Submits a CategorizeRequest and returns a CategorizeRequest.Response.
 QueryRequest.Response search(QueryRequest request, atg.search.client.SearchSession searchSession)
          Submits a QueryRequest and returns a QueryRequest.Response.
 SearchResponse search(SearchRequest request, atg.search.client.SearchSession searchSession)
          Catch-all method for searching with SearchRequest-derived types as SearchRequests.
 SimilarDocsRequest.Response search(SimilarDocsRequest request, atg.search.client.SearchSession searchSession)
          Submits a SimilarDocsRequest and returns a SimilarDocsRequest.Response.
 StructuredQueryRequest.Response search(StructuredQueryRequest request, atg.search.client.SearchSession searchSession)
          Submits a StructuredQueryRequest and returns a StructuredQueryRequest.Response.
 TreeQueryRequest.Response search(TreeQueryRequest request, atg.search.client.SearchSession searchSession)
          Submits a TreeQueryRequest and returns a TreeQueryRequest.Response.
 TypeAheadRequest.Response search(TypeAheadRequest request, atg.search.client.SearchSession searchSession)
          Submits a TypeAheadRequest and returns a TypeAheadRequest.Response.
 ViewDocumentRequest.Response search(ViewDocumentRequest request, atg.search.client.SearchSession searchSession)
          Submits a ViewDocumentRequest and returns a ViewDocumentRequest.Response.
 void setFiringSearchEvents(boolean pFiringSearchEvents)
          Enables or disables firing of search events
 void setLiveIndexingSupported(java.lang.String pEnvironmentName, boolean pIsLiveIndexingSupported)
          Sets whether live indexing is supported for the given environment.
 void setLiveSearchingSupported(java.lang.String pEnvironmentName, boolean pIsLiveSearchingSupported)
          Sets whether live searching is supported for the given live indexing environment.
 void setSearchMessageService(atg.search.events.SearchMessageTools pSearchMessageService)
           
 void setUseSmallReportingResponse(boolean pUseSmallReportingResponse)
           
 

Field Detail

CLASS_VERSION

static final java.lang.String CLASS_VERSION
Class version string

See Also:
Constant Field Values

APPSERVER_TYPE

static final java.lang.String APPSERVER_TYPE
property name for the type of appserver/server connection (rmi or local)

See Also:
Constant Field Values

HOSTNAME

static final java.lang.String HOSTNAME
property name for the server's hostname; only for rmi

See Also:
Constant Field Values

PORT

static final java.lang.String PORT
property name for the host's rmi port; only for rmi

See Also:
Constant Field Values

RMI_COMPONENT_PATH

static final java.lang.String RMI_COMPONENT_PATH
property name for the host's rmi component path; only for rmi

See Also:
Constant Field Values
Method Detail

reset

void reset()
Resets the client's connection. the first call after this will re-establish it


getSearchEnvironmentTargets

java.util.Collection getSearchEnvironmentTargets()
                                                 throws atg.search.client.SearchClientException
Returns:
List of SearchEnvironmentTarget
Throws:
atg.search.client.SearchClientException

isFiringSearchEvents

boolean isFiringSearchEvents()
                             throws atg.search.client.SearchClientException
Returns:
whether search events are being fired
Throws:
atg.search.client.SearchClientException

setFiringSearchEvents

void setFiringSearchEvents(boolean pFiringSearchEvents)
                           throws atg.search.client.SearchClientException
Enables or disables firing of search events

Parameters:
pFiringSearchEvents - true if search events should be fired
Throws:
atg.search.client.SearchClientException

isUseSmallReportingResponse

boolean isUseSmallReportingResponse()
Returns:
true if using small response objects for reporting

setUseSmallReportingResponse

void setUseSmallReportingResponse(boolean pUseSmallReportingResponse)
Parameters:
pUseSmallReportingResponse - true to enable use of small response objects for reporting

beginSession

atg.search.client.SearchSession beginSession()
                                             throws atg.search.client.SearchClientException
Begins the user search session.

Returns:
SearchSession object
Throws:
SearchClientException - that wraps any application server related exceptions

search

SearchResponse search(SearchRequest request,
                      atg.search.client.SearchSession searchSession)
                      throws atg.search.client.SearchClientException
Catch-all method for searching with SearchRequest-derived types as SearchRequests. This method requires the caller to cast the response to the appropriate response type. The preferred technique is to use the subtype-specific methods by passing in the requests as subtypes.

Parameters:
request -
searchSession -
Returns:
a search response
Throws:
atg.search.client.SearchClientException

search

QueryRequest.Response search(QueryRequest request,
                             atg.search.client.SearchSession searchSession)
                             throws atg.search.client.SearchClientException
Submits a QueryRequest and returns a QueryRequest.Response.

Parameters:
request - the query request
searchSession - active search session
Returns:
query response
Throws:
atg.search.client.SearchClientException

search

TreeQueryRequest.Response search(TreeQueryRequest request,
                                 atg.search.client.SearchSession searchSession)
                                 throws atg.search.client.SearchClientException
Submits a TreeQueryRequest and returns a TreeQueryRequest.Response.

Parameters:
request - the query request
searchSession - active search session
Returns:
query response
Throws:
atg.search.client.SearchClientException

search

TypeAheadRequest.Response search(TypeAheadRequest request,
                                 atg.search.client.SearchSession searchSession)
                                 throws atg.search.client.SearchClientException
Submits a TypeAheadRequest and returns a TypeAheadRequest.Response.

Parameters:
request - the query request
searchSession - active search session
Returns:
query response
Throws:
atg.search.client.SearchClientException

search

BrowseRequest.Response search(BrowseRequest request,
                              atg.search.client.SearchSession searchSession)
                              throws atg.search.client.SearchClientException
Submits a BrowseRequest and returns a BrowseRequest.Response.

Parameters:
request - the BrowseRequest request
searchSession - active search session
Returns:
BrowseRequest response
Throws:
atg.search.client.SearchClientException

search

CategorizeRequest.Response search(CategorizeRequest request,
                                  atg.search.client.SearchSession searchSession)
                                  throws atg.search.client.SearchClientException
Submits a CategorizeRequest and returns a CategorizeRequest.Response.

Parameters:
request - the CategorizeRequest request
searchSession - active search session
Returns:
CategorizeRequest response
Throws:
atg.search.client.SearchClientException

search

StructuredQueryRequest.Response search(StructuredQueryRequest request,
                                       atg.search.client.SearchSession searchSession)
                                       throws atg.search.client.SearchClientException
Submits a StructuredQueryRequest and returns a StructuredQueryRequest.Response.

Parameters:
request - the StructuredQueryRequest request
searchSession - active search session
Returns:
StructuredQueryRequest response
Throws:
atg.search.client.SearchClientException

search

ViewDocumentRequest.Response search(ViewDocumentRequest request,
                                    atg.search.client.SearchSession searchSession)
                                    throws atg.search.client.SearchClientException
Submits a ViewDocumentRequest and returns a ViewDocumentRequest.Response.

Parameters:
request - the ViewDocumentRequest request
searchSession - active search session
Returns:
ViewDocumentRequest response
Throws:
atg.search.client.SearchClientException

search

SimilarDocsRequest.Response search(SimilarDocsRequest request,
                                   atg.search.client.SearchSession searchSession)
                                   throws atg.search.client.SearchClientException
Submits a SimilarDocsRequest and returns a SimilarDocsRequest.Response.

Parameters:
request - the SimilarDocsRequest request
searchSession - active search session
Returns:
SimilarDocsRequest response
Throws:
atg.search.client.SearchClientException

getSearchMessageService

atg.search.events.SearchMessageTools getSearchMessageService()
                                                             throws atg.search.client.SearchClientException
Throws:
atg.search.client.SearchClientException

setSearchMessageService

void setSearchMessageService(atg.search.events.SearchMessageTools pSearchMessageService)
                             throws atg.search.client.SearchClientException
Throws:
atg.search.client.SearchClientException

isLiveIndexingSupported

boolean isLiveIndexingSupported(java.lang.String pEnvironmentName)
                                throws atg.search.client.SearchClientException
Indicates whether live indexing is supported for the environment. This is always false for environments that are not live indexing environments. For live indexing environments, it will be true unless an administrative operation is underway, such as backup, or adding/removing machines and engines. Routing will reject all indexing commands, and throw an exception, if indexing is attempted while this returns false.

Parameters:
pEnvironmentName -
Returns:
true if live indexing is supported for the environment
Throws:
SearchClientException

setLiveIndexingSupported

void setLiveIndexingSupported(java.lang.String pEnvironmentName,
                              boolean pIsLiveIndexingSupported)
                              throws atg.search.client.SearchClientException
Sets whether live indexing is supported for the given environment. This operation only applies to live indexing environments, and will be ignored for all others. When disabled, the condition should be regarded as temporary, and the duration of the disable should be as brief as possible.

Parameters:
pEnvironmentName -
pIsLiveIndexingSupported -
Throws:
SearchClientException

isLiveSearchingSupported

boolean isLiveSearchingSupported(java.lang.String pEnvironmentName)
                                 throws atg.search.client.SearchClientException
Indicates whether live searching is supported for the environment. This is always false for environments that are not live indexing environments. For live indexing environments, it will be true unless an administrative operation is underway, such as backup, or adding/removing machines and engines. It will return false if the environment does not have a running engine for every partition. Routing will reject search requests and throw an exception if searching is attempted while this returns false due to an administrative operation.

Parameters:
pEnvironmentName -
Returns:
true if live searching is supported for the environment
Throws:
SearchClientException

setLiveSearchingSupported

void setLiveSearchingSupported(java.lang.String pEnvironmentName,
                               boolean pIsLiveSearchingSupported)
                               throws atg.search.client.SearchClientException
Sets whether live searching is supported for the given live indexing environment. This operation only applies to live indexing environments, and will be ignored for all others. When disabled, the condition should be regarded as temporary, and the duration of the disable should be as brief as possible. Routing will reject all searching commands, and throw an exception, if searching is attempted while this returns false.

Parameters:
pEnvironmentName -
pIsLiveSearchingSupported -
Throws:
SearchClientException