Class SearchQueryRow
- java.lang.Object
-
- com.couchbase.client.java.search.result.SearchQueryRow
-
public class SearchQueryRow extends Object
An FTS result row (or hit).- Since:
- 2.3.0
-
-
Constructor Summary
Constructors Constructor Description SearchQueryRow(String index, String id, double score, JsonObject explanation, RowLocations locations, Map<String,List<String>> fragments, Map<String,String> fields)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
JsonObject
explanation()
Ifrequested in the query
, an explanation of the match, in JSON form.Map<String,String>
fields()
The value of each requested field (as defined in theSearchQuery
.Map<String,List<String>>
fragments()
The fragments for each field that was requested as highlighted (as defined in theSearchParams
).static SearchQueryRow
fromResponse(SearchChunkRow row)
int
hashCode()
String
id()
The id of the matching document.String
index()
The name of the FTS pindex that gave this result.RowLocations
locations()
This rows's location, as anRowLocations
map-like object.double
score()
The score of this hit.String
toString()
-
-
-
Method Detail
-
index
public String index()
The name of the FTS pindex that gave this result.
-
id
public String id()
The id of the matching document.
-
score
public double score()
The score of this hit.
-
explanation
public JsonObject explanation()
Ifrequested in the query
, an explanation of the match, in JSON form.
-
locations
public RowLocations locations()
This rows's location, as anRowLocations
map-like object.
-
fragments
public Map<String,List<String>> fragments()
The fragments for each field that was requested as highlighted (as defined in theSearchParams
).A fragment is an extract of the field's value where the matching terms occur. Matching terms are surrounded by a
<match>
tag.- Returns:
- the fragments as a
Map
. Keys are the fields.
-
fields
public Map<String,String> fields()
The value of each requested field (as defined in theSearchQuery
.- Returns:
- the fields values as a
Map
. Keys are the fields.
-
fromResponse
public static SearchQueryRow fromResponse(SearchChunkRow row)
-
-