Class DefaultSearchQueryRow
java.lang.Object
com.couchbase.client.java.search.result.impl.DefaultSearchQueryRow
- All Implemented Interfaces:
SearchQueryRow
@Committed @Public public class DefaultSearchQueryRow extends Object implements SearchQueryRow
The default implementation for a
SearchQueryRow
- Since:
- 2.3.0
- Author:
- Simon Baslé, Michael Nitschinger
-
Constructor Summary
Constructors Constructor Description DefaultSearchQueryRow(String index, String id, double score, JsonObject explanation, HitLocations locations, Map<String,List<String>> fragments, Map<String,String> fields)
-
Method Summary
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
).int
hashCode()
String
id()
The id of the matching document.String
index()
The name of the FTS pindex that gave this result.HitLocations
locations()
This hit's location, as anHitLocations
map-like object.double
score()
The score of this hit.String
toString()
-
Constructor Details
-
DefaultSearchQueryRow
-
-
Method Details
-
index
Description copied from interface:SearchQueryRow
The name of the FTS pindex that gave this result.- Specified by:
index
in interfaceSearchQueryRow
-
id
Description copied from interface:SearchQueryRow
The id of the matching document.- Specified by:
id
in interfaceSearchQueryRow
-
score
public double score()Description copied from interface:SearchQueryRow
The score of this hit.- Specified by:
score
in interfaceSearchQueryRow
-
explanation
Description copied from interface:SearchQueryRow
Ifrequested in the query
, an explanation of the match, in JSON form.- Specified by:
explanation
in interfaceSearchQueryRow
-
locations
Description copied from interface:SearchQueryRow
This hit's location, as anHitLocations
map-like object.- Specified by:
locations
in interfaceSearchQueryRow
-
fragments
Description copied from interface:SearchQueryRow
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.- Specified by:
fragments
in interfaceSearchQueryRow
- Returns:
- the fragments as a
Map
. Keys are the fields.
-
fields
Description copied from interface:SearchQueryRow
The value of each requested field (as defined in theSearchQuery
.- Specified by:
fields
in interfaceSearchQueryRow
- Returns:
- the fields values as a
Map
. Keys are the fields.
-
equals
-
hashCode
public int hashCode() -
toString
-