@InterfaceStability.Experimental @InterfaceAudience.Public public class DefaultHitLocations extends Object implements HitLocations
A default implementation of a 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 a location and allow method chaining
add
in interface HitLocations
public List<HitLocation> get(String field)
HitLocations
list all locations for a given field (any term)
get
in interface HitLocations
public List<HitLocation> get(String field, String term)
HitLocations
list all locations for a given field and term
get
in interface HitLocations
public List<HitLocation> getAll()
HitLocations
list all locations (any field, any term)
getAll
in interface HitLocations
public long count()
HitLocations
size of all()
count
in interface HitLocations
public List<String> fields()
HitLocations
list the fields in this location
fields
in interface HitLocations
public List<String> termsFor(String field)
HitLocations
list the terms for a given field
termsFor
in interface HitLocations
public Set<String> terms()
HitLocations
list all terms in this locations, considering all fields (so a set)
terms
in interface HitLocations
public static HitLocations from(JsonObject locationsJson)
Parses a FTS JSON representation of a HitLocations
.
Copyright © 2015 Couchbase, Inc.