Package com.attivio.sdk.client
Interface SearchClient
-
- All Known Implementing Classes:
AbstractSearchClient
,LocalSearchClientImpl
,MockSearchClient
,RemoteSearchClient
public interface SearchClient
Client for issuing searches against an AIE system.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_SEARCH_WORKFLOW
Default workflow used for new clients.static java.lang.String
ENDPOINT
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Schema
getDefaultSchema()
Gets the schema named 'default' which is the most commonly one used throughout the system.SearchDocument
getDocumentById(java.lang.String documentId)
Gets a document by a specific document IdSchema
getSchema(java.lang.String schemaName)
Get a named schema in the system or null if it does not exist.QueryResponse
search(QueryRequest query)
Sends the query to the Attivio search and returns the result.StreamingQueryResponse
search(StreamingQueryRequest req)
Sends the streaming query request to the Attivio search and returns the result.QueryResponse
search(java.lang.String query)
Searches using a query string only.void
setClientWorkflow(java.lang.String workflow)
Sets the default client workflow to use for this search client.
-
-
-
Field Detail
-
DEFAULT_SEARCH_WORKFLOW
static final java.lang.String DEFAULT_SEARCH_WORKFLOW
Default workflow used for new clients.- See Also:
- Constant Field Values
-
ENDPOINT
static final java.lang.String ENDPOINT
- See Also:
- Constant Field Values
-
-
Method Detail
-
search
QueryResponse search(QueryRequest query) throws AttivioException
Sends the query to the Attivio search and returns the result.- Parameters:
query
- the query to send- Returns:
- query response
- Throws:
AttivioException
-
getDocumentById
SearchDocument getDocumentById(java.lang.String documentId) throws AttivioException
Gets a document by a specific document Id- Parameters:
documentId
- ID of the document that will be returned- Returns:
- document that was requested or null if does not exist.
- Throws:
AttivioException
-
search
QueryResponse search(java.lang.String query) throws AttivioException
Searches using a query string only. The query is assumed to be in the simple Attivio query language.- Parameters:
query
- the query to use- Returns:
- the query response
- Throws:
AttivioException
-
getDefaultSchema
Schema getDefaultSchema() throws AttivioException
Gets the schema named 'default' which is the most commonly one used throughout the system.- Throws:
AttivioException
-
getSchema
Schema getSchema(java.lang.String schemaName) throws AttivioException
Get a named schema in the system or null if it does not exist.- Throws:
AttivioException
-
setClientWorkflow
void setClientWorkflow(java.lang.String workflow)
Sets the default client workflow to use for this search client.- Parameters:
workflow
- the workflow name to use
-
search
StreamingQueryResponse search(StreamingQueryRequest req) throws AttivioException, java.io.IOException
Sends the streaming query request to the Attivio search and returns the result.- Parameters:
req
- the streaming query request to send- Returns:
- streaming query response
- Throws:
AttivioException
java.io.IOException
-
-