@InterfaceStability.Uncommitted @InterfaceAudience.Public public class DefaultHitLocations extends Object implements HitLocations
HitLocations
.Constructor and Description |
---|
DefaultHitLocations() |
Modifier and Type | Method and Description |
---|---|
HitLocations |
add(HitLocation l)
add a location and allow method chaining
|
long |
count()
size of all()
|
List<String> |
fields()
list the fields in this location
|
static HitLocations |
from(JsonObject locationsJson)
Parses a FTS JSON representation of a
HitLocations . |
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 term
|
List<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 field
|
String |
toString() |
public HitLocations add(HitLocation l)
HitLocations
add
in interface HitLocations
public List<HitLocation> get(String field)
HitLocations
get
in interface HitLocations
public List<HitLocation> get(String field, String term)
HitLocations
get
in interface HitLocations
public List<HitLocation> getAll()
HitLocations
getAll
in interface HitLocations
public long count()
HitLocations
count
in interface HitLocations
public List<String> fields()
HitLocations
fields
in interface HitLocations
public List<String> termsFor(String field)
HitLocations
termsFor
in interface HitLocations
public Set<String> terms()
HitLocations
terms
in interface HitLocations
public static HitLocations from(JsonObject locationsJson)
HitLocations
.Copyright © 2015 Couchbase, Inc.