Class DefaultHitLocations
java.lang.Object
com.couchbase.client.java.search.result.hits.DefaultHitLocations
- All Implemented Interfaces:
HitLocations
@Uncommitted @Public public class DefaultHitLocations extends Object implements HitLocations
A default implementation of a
HitLocations.- Since:
- 2.3.0
- Author:
- Simon Baslé, Michael Nitschinger
-
Constructor Summary
Constructors Constructor Description DefaultHitLocations() -
Method Summary
Modifier and Type Method Description HitLocationsadd(HitLocation l)add a location and allow method chaininglongcount()size of all()List<String>fields()list the fields in this locationstatic HitLocationsfrom(JsonObject locationsJson)Parses a FTS JSON representation of aHitLocations.List<HitLocation>get(String field)list all locations for a given field (any term)List<HitLocation>get(String field, String term)list all locations for a given field and termList<HitLocation>getAll()list all locations (any field, any term)Set<String>terms()list all terms in this locations, considering all fields (so a set)List<String>termsFor(String field)list the terms for a given fieldStringtoString()
-
Constructor Details
-
DefaultHitLocations
public DefaultHitLocations()
-
-
Method Details
-
add
Description copied from interface:HitLocationsadd a location and allow method chaining- Specified by:
addin interfaceHitLocations
-
get
Description copied from interface:HitLocationslist all locations for a given field (any term)- Specified by:
getin interfaceHitLocations
-
get
Description copied from interface:HitLocationslist all locations for a given field and term- Specified by:
getin interfaceHitLocations
-
getAll
Description copied from interface:HitLocationslist all locations (any field, any term)- Specified by:
getAllin interfaceHitLocations
-
count
public long count()Description copied from interface:HitLocationssize of all()- Specified by:
countin interfaceHitLocations
-
fields
Description copied from interface:HitLocationslist the fields in this location- Specified by:
fieldsin interfaceHitLocations
-
termsFor
Description copied from interface:HitLocationslist the terms for a given field- Specified by:
termsForin interfaceHitLocations
-
terms
Description copied from interface:HitLocationslist all terms in this locations, considering all fields (so a set)- Specified by:
termsin interfaceHitLocations
-
from
Parses a FTS JSON representation of aHitLocations. -
toString
-