public interface StreamingQueryResponse extends Closeable
SearchClient.search(StreamingQueryRequest)
to issues streaming queries.
IMPORTANT:Results must be retrieved in the following order and result retrieval is NOT thread safe. Attempting to retrieve a response type that was not requested may throw an exception.
getDocumentIds()
or getDocuments()
depending on the value of the requested
StreamingQueryRequest.DocumentStreamingMode
getFacets()
- you must call StreamingQueryRequest.setStreamFacets(boolean)
to include facet
resultsgetQueryResponse()
SearchClient
,
StreamingQueryRequest
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Force disconnect the client connection.
|
void |
close()
Closes the streaming connection.
|
Iterable<String> |
getDocumentIds()
Get the response document ids.
|
Iterable<SearchDocument> |
getDocuments()
Get the response documents.
|
Iterable<StreamingFacetResponse> |
getFacets()
Get the facets.
|
QueryResponse |
getQueryResponse()
Get the QueryResponse for the query.
|
Iterable<SearchDocument> getDocuments() throws IOException
This method will throw an exception if documents are not yet available, or were not requested.
IOException
Iterable<String> getDocumentIds() throws IOException
This method will throw an exception if document ids are not yet available, or were not requested.
IOException
Iterable<StreamingFacetResponse> getFacets() throws IOException
This method will throw an exception if facets are not yet available, or were not requested.
IOException
QueryResponse getQueryResponse() throws IOException, AttivioException
This method will throw an exception if the query response is not yet available, or if the query execution resulted in an exception.
NOTE: this method may return null
if stream was closed prematurely.
IOException
AttivioException
void close() throws IOException
close
in interface AutoCloseable
close
in interface Closeable
IOException
void cancel() throws IOException
IOException
Copyright © 2018 Attivio, Inc. All Rights Reserved.
PATENT NOTICE: Attivio, Inc. Software Related Patents. With respect to the Attivio software product(s) being used, the following patents apply: Querying Joined Data Within A Search Engine Index: United States Patent No.(s): 8,073,840. Ordered Processing of Groups of Messages: U.S. Patent No.(s) 8,495,656. Signal processing approach to sentiment analysis for entities in documents: U.S. Patent No.(s) 8,725,494. Other U.S. and International Patents Pending.