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 aSearchQueryRow- 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)JsonObjectexplanation()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).inthashCode()Stringid()The id of the matching document.Stringindex()The name of the FTS pindex that gave this result.HitLocationslocations()This hit's location, as anHitLocationsmap-like object.doublescore()The score of this hit.StringtoString()
-
-
-
Method Detail
-
index
public String index()
Description copied from interface:SearchQueryRowThe name of the FTS pindex that gave this result.- Specified by:
indexin interfaceSearchQueryRow
-
id
public String id()
Description copied from interface:SearchQueryRowThe id of the matching document.- Specified by:
idin interfaceSearchQueryRow
-
score
public double score()
Description copied from interface:SearchQueryRowThe score of this hit.- Specified by:
scorein interfaceSearchQueryRow
-
explanation
public JsonObject explanation()
Description copied from interface:SearchQueryRowIfrequested in the query, an explanation of the match, in JSON form.- Specified by:
explanationin interfaceSearchQueryRow
-
locations
public HitLocations locations()
Description copied from interface:SearchQueryRowThis hit's location, as anHitLocationsmap-like object.- Specified by:
locationsin interfaceSearchQueryRow
-
fragments
public Map<String,List<String>> fragments()
Description copied from interface:SearchQueryRowThe 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:
fragmentsin interfaceSearchQueryRow- Returns:
- the fragments as a
Map. Keys are the fields.
-
fields
public Map<String,String> fields()
Description copied from interface:SearchQueryRowThe value of each requested field (as defined in theSearchQuery.- Specified by:
fieldsin interfaceSearchQueryRow- Returns:
- the fields values as a
Map. Keys are the fields.
-
-