public class QueryResponse extends AbstractPlatformMessage implements Serializable
QueryRequest
.
The response may contain any of the following based on the initial request:
QueryRequest
after modifications by all query request/response transformers. NOTE: this should NOT be reused.SearchDocumentList
Modifier and Type | Field and Description |
---|---|
static String |
SPELLCHECK_SUGGESTED
The response property containing the spellcheck suggested query
|
static String |
SPELLCHECK_SUGGESTED_MARKEDUP
The response property containing the marked up spellcheck suggested query
|
static String |
STATISTICS_LINGUISTICS_INFO
The response property containing the query linguistics info
|
static String |
STATISTICS_QUERY_INFO
The response property containing the query statistics
|
static String |
TERMCOUNTCHECK_REPORT
The response property containing the term count check report
|
DEFAULT_MAX_LOG_LENGTH, MESSAGE_DROPPED, MESSAGE_SEND_TIME_PROP, PROP_MAX_LOG_LENGTH
Modifier | Constructor and Description |
---|---|
protected |
QueryResponse() |
|
QueryResponse(QueryRequest request)
Creates a new QueryResponse from a QueryRequest object.
|
|
QueryResponse(UUID clientId,
WorkflowQueue workflows) |
Modifier and Type | Method and Description |
---|---|
void |
addFeedback(List<QueryFeedback> value)
Add multiple feedback messages.
|
void |
addFeedback(QueryFeedback... value)
Add multiple feedback messages.
|
QueryFeedback |
addFeedback(QueryFeedback message)
Add a feedback message.
|
QueryFeedback |
addFeedback(String stageName,
String messageName,
String message)
Add a feedback message.
|
QueryFeedback |
addFeedback(String stageName,
String messageName,
String message,
Map<String,Object> properties)
Add a feedback message.
|
void |
addPlacement(QueryPlacement value) |
QueryResponse |
clone()
Clones the object and resets message ID to -1.
|
boolean |
equals(Object other) |
SearchDocumentList |
getDocuments()
Get the documents returned for this response.
|
FacetResponse |
getFacet(String name)
Gets a facet by name.
|
List<FacetResponse> |
getFacets()
Get the generated facets for this response.
|
long |
getFacetTime()
Get the number of milliseconds taken to compute facets.
|
List<QueryFeedback> |
getFeedback()
Get all feedback messages for this response.
|
List<QueryFeedback> |
getFeedbackByMessageName(String messageName)
Get all query feedback that has a message specific message name.
|
long |
getHighlightTime()
Get the number of milliseconds taken to highlight results.
|
List<QueryPlacement> |
getPlacements()
Get all placements for this response.
|
QueryRequest |
getQueryRequest()
Get the
QueryRequest for this response. |
long |
getQueryTimestamp()
Get the timestamp the query was received
|
long |
getResponseTime()
The total time spent processing a request including network and serialization time in milliseconds.
|
long |
getResultTime()
Get the number of milliseconds taken to generate results.
|
String |
getSchemaName()
Get the schema name specified for the request.
|
long |
getSearchTime()
Get the number of milliseconds taken to execute the search.
|
long |
getTotalRows()
Gets the total number of rows that matched the query.
|
long |
getWorkflowTime()
Get the number of milliseconds spent in workflow stages.
|
int |
hashCode() |
void |
setDocuments(SearchDocumentList value)
Set the documents to return with this repsonse.
|
void |
setFacets(FacetResponse... value)
Set the generated facets for this response.
|
void |
setFacets(List<FacetResponse> value)
Set the generated facets for this response.
|
void |
setFacetTime(long time)
Set the number of milliseconds taken to compute facets.
|
void |
setFeedback(List<QueryFeedback> value) |
void |
setHighlightTime(long time)
Set the number of milliseconds taken to highlight results.
|
void |
setPlacements(List<QueryPlacement> value) |
void |
setQueryRequest(QueryRequest value)
Set the
QueryRequest for this response. |
void |
setQueryTimestamp(long queryTime)
Set the timestamp the query was received
|
void |
setResultTime(long time)
Set the number of milliseconds taken to generate results.
|
void |
setSearchTime(long time)
Set the number of milliseconds taken to execute the search.
|
void |
setWorkflowTime(long time)
Set the number of milliseconds spent in workflow stages.
|
protected StringBuilder |
toString(StringBuilder buffer)
Append the string form of this request to
buffer . |
addMessageHistory, addMessageHistory, getClientId, getEstimatedSize, getMessageHistory, getMessageId, getMetadata, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getWorkflowQueue, getWorkflowQueue, hasProperty, isRedelivered, removeProperty, removeWorkflowQueue, setClientId, setMessageId, setProperty, setRedelivered, setWorkflowQueue, setWorkflowQueue, toMessageString, toString, toString, toString, toString, toString, toString, toString, toString, toString
public static final String SPELLCHECK_SUGGESTED
public static final String SPELLCHECK_SUGGESTED_MARKEDUP
public static final String TERMCOUNTCHECK_REPORT
public static final String STATISTICS_QUERY_INFO
public static final String STATISTICS_LINGUISTICS_INFO
protected QueryResponse()
public QueryResponse(QueryRequest request)
Any workflows set on request
are transferred to the new query response,
that is they do not remain on request
.
public QueryResponse(UUID clientId, WorkflowQueue workflows)
public String getSchemaName()
public long getTotalRows()
public SearchDocumentList getDocuments()
NOTE: this will only contain a "window" over the total result set based on the requested number of rows and offset requested.
public void setDocuments(SearchDocumentList value)
public QueryRequest getQueryRequest()
QueryRequest
for this response.
NOTE: this may be null in order to optimize network traffic.
public void setQueryRequest(QueryRequest value)
QueryRequest
for this response.public long getWorkflowTime()
This is the total time spent during workflow processing. This included search time/facet time/response time.
public void setWorkflowTime(long time)
public long getResponseTime()
public long getSearchTime()
This time only takes into account the time spent matching and ordering results.
public void setSearchTime(long time)
public long getFacetTime()
public void setFacetTime(long time)
public long getResultTime()
This is the time taken to create the SearchDocument
s for the response.
public void setResultTime(long time)
public long getHighlightTime()
NOTE: this is the total CPU time spent during highlighting. This may be greater than the wall clock time in the case of multi-column installations.
public void setHighlightTime(long time)
public long getQueryTimestamp()
public void setQueryTimestamp(long queryTime)
public List<FacetResponse> getFacets()
NOTE: this method will never return null
.
public FacetResponse getFacet(String name)
public void setFacets(List<FacetResponse> value)
public void setFacets(FacetResponse... value)
public List<QueryPlacement> getPlacements()
public void setPlacements(List<QueryPlacement> value)
public void addPlacement(QueryPlacement value)
public List<QueryFeedback> getFeedback()
public void setFeedback(List<QueryFeedback> value)
public List<QueryFeedback> getFeedbackByMessageName(String messageName)
public QueryFeedback addFeedback(QueryFeedback message)
public void addFeedback(List<QueryFeedback> value)
public void addFeedback(QueryFeedback... value)
public QueryFeedback addFeedback(String stageName, String messageName, String message)
public QueryFeedback addFeedback(String stageName, String messageName, String message, Map<String,Object> properties)
public int hashCode()
hashCode
in class AbstractPlatformMessage
public boolean equals(Object other)
equals
in class AbstractPlatformMessage
protected StringBuilder toString(StringBuilder buffer)
buffer
.toString
in class AbstractPlatformMessage
public QueryResponse clone()
clone
in interface PlatformMessage
clone
in class AbstractPlatformMessage
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.