Package com.couchbase.client.java.search
Class SearchQuery
- java.lang.Object
-
- com.couchbase.client.java.search.SearchQuery
-
- Direct Known Subclasses:
AbstractCompoundQuery
,BooleanFieldQuery
,BooleanQuery
,DateRangeQuery
,DocIdQuery
,GeoBoundingBoxQuery
,GeoDistanceQuery
,GeoPolygonQuery
,MatchAllQuery
,MatchNoneQuery
,MatchPhraseQuery
,MatchQuery
,NumericRangeQuery
,PhraseQuery
,PrefixQuery
,QueryStringQuery
,RegexpQuery
,TermQuery
,TermRangeQuery
,WildcardQuery
@Internal public abstract class SearchQuery extends Object
A base class for all FTS query classes. Exposes the common FTS query parameters. In order to instantiate various flavors of queries, look at concrete classes or static factory methods inSearchQuery
.- Since:
- 2.3.0
- Author:
- Simon Baslé, Michael Nitschinger
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SearchQuery()
-
Method Summary
-
-
-
Field Detail
-
boost
protected Double boost
-
-
Method Detail
-
boost
public SearchQuery boost(double boost)
-
toCore
@Internal public abstract CoreSearchQuery toCore()
-
export
public JsonObject export()
Exports the whole query as aJsonObject
.
-
toString
public String toString()
-
queryString
public static QueryStringQuery queryString(String query)
Prepare aQueryStringQuery
body.
-
match
public static MatchQuery match(String match)
Prepare aMatchQuery
body.
-
matchPhrase
public static MatchPhraseQuery matchPhrase(String matchPhrase)
Prepare aMatchPhraseQuery
body.
-
prefix
public static PrefixQuery prefix(String prefix)
Prepare aPrefixQuery
body.
-
regexp
public static RegexpQuery regexp(String regexp)
Prepare aRegexpQuery
body.
-
termRange
public static TermRangeQuery termRange()
Prepare aTermRangeQuery
body.
-
numericRange
public static NumericRangeQuery numericRange()
Prepare aNumericRangeQuery
body.
-
dateRange
public static DateRangeQuery dateRange()
Prepare aDateRangeQuery
body.
-
disjuncts
public static DisjunctionQuery disjuncts(SearchQuery... queries)
Prepare aDisjunctionQuery
body.
-
conjuncts
public static ConjunctionQuery conjuncts(SearchQuery... queries)
Prepare aConjunctionQuery
body.
-
booleans
public static BooleanQuery booleans()
Prepare aBooleanQuery
body.
-
wildcard
public static WildcardQuery wildcard(String wildcard)
Prepare aWildcardQuery
body.
-
docId
public static DocIdQuery docId(String... docIds)
Prepare aDocIdQuery
body.
-
booleanField
public static BooleanFieldQuery booleanField(boolean value)
Prepare aBooleanFieldQuery
body.
-
phrase
public static PhraseQuery phrase(String... terms)
Prepare aPhraseQuery
body.
-
matchAll
public static MatchAllQuery matchAll()
Prepare aMatchAllQuery
body.
-
matchNone
public static MatchNoneQuery matchNone()
Prepare aMatchNoneQuery
body.
-
geoBoundingBox
public static GeoBoundingBoxQuery geoBoundingBox(double topLeftLon, double topLeftLat, double bottomRightLon, double bottomRightLat)
Prepare aGeoBoundingBoxQuery
body.
-
geoBoundingBox
@Uncommitted public static GeoBoundingBoxQuery geoBoundingBox(Coordinate topLeftCoordinate, Coordinate bottomRightCoordinate)
Prepare aGeoBoundingBoxQuery
body.
-
geoDistance
public static GeoDistanceQuery geoDistance(double locationLon, double locationLat, String distance)
Prepare aGeoDistanceQuery
body.
-
geoDistance
@Uncommitted public static GeoDistanceQuery geoDistance(Coordinate locationCoordinate, String distance)
Prepare aGeoDistanceQuery
body.
-
geoPolygon
@Uncommitted @SinceCouchbase("6.5.1") public static GeoPolygonQuery geoPolygon(List<Coordinate> coordinates)
Prepare aGeoPolygonQuery
body.
-
-