@InterfaceStability.Committed @InterfaceAudience.Public public class DefaultSearchQueryResult extends Object implements SearchQueryResult
SearchQueryResult| Modifier and Type | Field and Description |
|---|---|
static rx.functions.Func1<AsyncSearchQueryResult,rx.Observable<SearchQueryResult>> |
FROM_ASYNC
|
| Constructor and Description |
|---|
DefaultSearchQueryResult(SearchStatus status,
List<SearchQueryRow> hits,
Throwable error,
Map<String,FacetResult> facets,
SearchMetrics metrics) |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
errors()
When an execution error happens (including partial results), this method returns a
List of
the error(s) in JSON format. |
Map<String,FacetResult> |
facets()
If one or more facet were requested via the
SearchQuery.addFacet(String, SearchFacet) method
when querying, contains the result of each facet. |
List<SearchQueryRow> |
hits()
The list of FTS result rows, or "hits", for the FTS query.
|
List<SearchQueryRow> |
hitsOrFail()
The list of FTS result rows, or "hits", for the FTS query.
|
Iterator<SearchQueryRow> |
iterator()
Returns an iterator over the hits (
SearchQueryRow). |
SearchMetrics |
metrics()
Provides a
SearchMetrics object giving statistics on the request like number of hits, total time taken... |
SearchStatus |
status()
The
SearchStatus allows to check if the request was a full success (SearchStatus.isSuccess())
and gives more details about status for each queried index. |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic static final rx.functions.Func1<AsyncSearchQueryResult,rx.Observable<SearchQueryResult>> FROM_ASYNC
public DefaultSearchQueryResult(SearchStatus status, List<SearchQueryRow> hits, Throwable error, Map<String,FacetResult> facets, SearchMetrics metrics)
public SearchStatus status()
SearchQueryResultSearchStatus allows to check if the request was a full success (SearchStatus.isSuccess())
and gives more details about status for each queried index.status in interface SearchQueryResultpublic List<SearchQueryRow> hits()
SearchQueryResulthits in interface SearchQueryResultfor a variant that throws an exception whenever execution errors have occurred.,
to get a list of execution errors in JSON form.public List<SearchQueryRow> hitsOrFail()
SearchQueryResultCompositeException is thrown instead.hitsOrFail in interface SearchQueryResultfor a variant that lists partial results instead of throwing the exception.,
to get a list of execution errors in JSON form.public Iterator<SearchQueryRow> iterator()
SearchQueryResultSearchQueryRow).
If an execution error happened, the corresponding exception is
thrown instead (same as attempting to iterate over SearchQueryResult.hitsOrFail()).iterator in interface SearchQueryResultiterator in interface Iterable<SearchQueryRow>public List<String> errors()
SearchQueryResultList of
the error(s) in JSON format.public Map<String,FacetResult> facets()
SearchQueryResultSearchQuery.addFacet(String, SearchFacet) method
when querying, contains the result of each facet.
The map keys are the names given to each requested facet.
facets in interface SearchQueryResultpublic SearchMetrics metrics()
SearchQueryResultSearchMetrics object giving statistics on the request like number of hits, total time taken...metrics in interface SearchQueryResultCopyright © 2015 Couchbase, Inc.