public class SearchRow extends Object
Constructor and Description |
---|
SearchRow(com.couchbase.client.core.api.search.result.CoreSearchRow internal,
JsonSerializer serializer) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
JsonObject |
explanation()
If
SearchOptions.explain(boolean) was set to true, returns an explanation of the match. |
<T> T |
fieldsAs(Class<T> target)
The value of each requested field (as defined in the
SearchQuery . |
<T> T |
fieldsAs(TypeRef<T> target)
The value of each requested field (as defined in the
SearchQuery . |
Map<String,List<String>> |
fragments()
The fragments for each field that was requested as highlighted
(as defined in the
SearchParams ). |
int |
hashCode() |
String |
id()
The id of the matching document.
|
String |
index()
The name of the FTS index that gave this result.
|
Optional<SearchRowLocations> |
locations()
This rows's location, as an
SearchRowLocations map-like object. |
double |
score()
The score of this hit.
|
String |
toString() |
public SearchRow(com.couchbase.client.core.api.search.result.CoreSearchRow internal, JsonSerializer serializer)
public String index()
public String id()
public double score()
public JsonObject explanation()
SearchOptions.explain(boolean)
was set to true, returns an explanation of the match.
Otherwise, returns an empty object. Intended for diagnostic use only;
the structure of the JSON is unspecified, and not part of the public committed API.public Optional<SearchRowLocations> locations()
SearchRowLocations
map-like object.public Map<String,List<String>> fragments()
SearchParams
).
A fragment is an extract of the field's value where the matching terms occur.
Matching terms are surrounded by a <match>
tag.
Map
. Keys are the fields.public <T> T fieldsAs(Class<T> target)
SearchQuery
.public <T> T fieldsAs(TypeRef<T> target)
SearchQuery
.Copyright © 2024 Couchbase, Inc.. All rights reserved.