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 HitLocations
add(HitLocation l)
add a location and allow method chaininglong
count()
size of all()List<String>
fields()
list the fields in this locationstatic HitLocations
from(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 fieldString
toString()
-
Constructor Details
-
DefaultHitLocations
public DefaultHitLocations()
-
-
Method Details
-
add
Description copied from interface:HitLocations
add a location and allow method chaining- Specified by:
add
in interfaceHitLocations
-
get
Description copied from interface:HitLocations
list all locations for a given field (any term)- Specified by:
get
in interfaceHitLocations
-
get
Description copied from interface:HitLocations
list all locations for a given field and term- Specified by:
get
in interfaceHitLocations
-
getAll
Description copied from interface:HitLocations
list all locations (any field, any term)- Specified by:
getAll
in interfaceHitLocations
-
count
public long count()Description copied from interface:HitLocations
size of all()- Specified by:
count
in interfaceHitLocations
-
fields
Description copied from interface:HitLocations
list the fields in this location- Specified by:
fields
in interfaceHitLocations
-
termsFor
Description copied from interface:HitLocations
list the terms for a given field- Specified by:
termsFor
in interfaceHitLocations
-
terms
Description copied from interface:HitLocations
list all terms in this locations, considering all fields (so a set)- Specified by:
terms
in interfaceHitLocations
-
from
Parses a FTS JSON representation of aHitLocations
. -
toString
-