public class SearchRow extends Object
Constructor and Description |
---|
SearchRow(String index,
String id,
double score,
JsonObject explanation,
Optional<SearchRowLocations> locations,
Map<String,List<String>> fragments,
byte[] fields,
JsonSerializer serializer) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
JsonObject |
explanation()
If
SearchOptions.explain(boolean) () requested in the query}, an explanation of the match, in JSON form. |
<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 ). |
static SearchRow |
fromResponse(SearchChunkRow row,
JsonSerializer serializer) |
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(String index, String id, double score, JsonObject explanation, Optional<SearchRowLocations> locations, Map<String,List<String>> fragments, byte[] fields, JsonSerializer serializer)
public String index()
public String id()
public double score()
public JsonObject explanation()
SearchOptions.explain(boolean)
() requested in the query}, an explanation of the match, in JSON form.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
.public static SearchRow fromResponse(SearchChunkRow row, JsonSerializer serializer)
Copyright © 2020 Couchbase, Inc.. All rights reserved.