Class SearchResult
- java.lang.Object
-
- com.couchbase.client.java.search.result.SearchResult
-
public class SearchResult extends Object
Full Text Search (FTS) query results, as returned from the asynchronous API. It is also anIterable<SearchQueryRow>
, where iteration is similar to iterating overrowsOrFail()
.- Since:
- 2.3.0
- Author:
- Simon Baslé, Michael Nitschinger
-
-
Constructor Summary
Constructors Constructor Description SearchResult(List<SearchQueryRow> rows, List<RuntimeException> errors, SearchMeta meta)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<RuntimeException>
errors()
When an execution error happens (including partial results), this method returns aList
of the error(s) inJSON format
.SearchMeta
meta()
Any additional meta information associated with the FTS query.List<SearchQueryRow>
rows()
The list of FTS result rows for the FTS query.List<SearchQueryRow>
rowsOrFail()
The list of FTS result rows for the FTS query.
-
-
-
Constructor Detail
-
SearchResult
public SearchResult(List<SearchQueryRow> rows, List<RuntimeException> errors, SearchMeta meta)
-
-
Method Detail
-
meta
public SearchMeta meta()
Any additional meta information associated with the FTS query.
-
rows
public List<SearchQueryRow> rows()
The list of FTS result rows for the FTS query. This method always returns a list, including when an execution error (eg. partial results) occurred.
-
rowsOrFail
public List<SearchQueryRow> rowsOrFail()
The list of FTS result rows for the FTS query. In case of an execution error (eg. partial results), aRuntimeException
is thrown instead, containing the first error.
-
errors
public List<RuntimeException> errors()
When an execution error happens (including partial results), this method returns aList
of the error(s) inJSON format
.
-
-