@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, wait
forEach, spliterator
public 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()
SearchQueryResult
SearchStatus
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 SearchQueryResult
public List<SearchQueryRow> hits()
SearchQueryResult
hits
in interface SearchQueryResult
for 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()
SearchQueryResult
CompositeException
is thrown instead.hitsOrFail
in interface SearchQueryResult
for 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()
SearchQueryResult
SearchQueryRow
).
If an execution error happened, the corresponding exception is
thrown instead (same as attempting to iterate over SearchQueryResult.hitsOrFail()
).iterator
in interface SearchQueryResult
iterator
in interface Iterable<SearchQueryRow>
public List<String> errors()
SearchQueryResult
List
of
the error(s) in JSON format
.public Map<String,FacetResult> facets()
SearchQueryResult
SearchQuery.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 SearchQueryResult
public SearchMetrics metrics()
SearchQueryResult
SearchMetrics
object giving statistics on the request like number of hits, total time taken...metrics
in interface SearchQueryResult
Copyright © 2015 Couchbase, Inc.