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 protectedSearchQuery()
-
Method Summary
-
-
-
Method Detail
-
boost
public SearchQuery boost(double boost)
-
injectParamsAndBoost
public void injectParamsAndBoost(JsonObject input)
-
injectParams
protected abstract void injectParams(JsonObject input)
-
export
public JsonObject export()
Exports the whole query as aJsonObject.
-
toString
public String toString()
-
queryString
public static QueryStringQuery queryString(String query)
Prepare aQueryStringQuerybody.
-
match
public static MatchQuery match(String match)
Prepare aMatchQuerybody.
-
matchPhrase
public static MatchPhraseQuery matchPhrase(String matchPhrase)
Prepare aMatchPhraseQuerybody.
-
prefix
public static PrefixQuery prefix(String prefix)
Prepare aPrefixQuerybody.
-
regexp
public static RegexpQuery regexp(String regexp)
Prepare aRegexpQuerybody.
-
termRange
public static TermRangeQuery termRange()
Prepare aTermRangeQuerybody.
-
numericRange
public static NumericRangeQuery numericRange()
Prepare aNumericRangeQuerybody.
-
dateRange
public static DateRangeQuery dateRange()
Prepare aDateRangeQuerybody.
-
disjuncts
public static DisjunctionQuery disjuncts(SearchQuery... queries)
Prepare aDisjunctionQuerybody.
-
conjuncts
public static ConjunctionQuery conjuncts(SearchQuery... queries)
Prepare aConjunctionQuerybody.
-
booleans
public static BooleanQuery booleans()
Prepare aBooleanQuerybody.
-
wildcard
public static WildcardQuery wildcard(String wildcard)
Prepare aWildcardQuerybody.
-
docId
public static DocIdQuery docId(String... docIds)
Prepare aDocIdQuerybody.
-
booleanField
public static BooleanFieldQuery booleanField(boolean value)
Prepare aBooleanFieldQuerybody.
-
phrase
public static PhraseQuery phrase(String... terms)
Prepare aPhraseQuerybody.
-
matchAll
public static MatchAllQuery matchAll()
Prepare aMatchAllQuerybody.
-
matchNone
public static MatchNoneQuery matchNone()
Prepare aMatchNoneQuerybody.
-
geoBoundingBox
public static GeoBoundingBoxQuery geoBoundingBox(double topLeftLon, double topLeftLat, double bottomRightLon, double bottomRightLat)
Prepare aGeoBoundingBoxQuerybody.
-
geoBoundingBox
@Uncommitted public static GeoBoundingBoxQuery geoBoundingBox(Coordinate topLeftCoordinate, Coordinate bottomRightCoordinate)
Prepare aGeoBoundingBoxQuerybody.
-
geoDistance
public static GeoDistanceQuery geoDistance(double locationLon, double locationLat, String distance)
Prepare aGeoDistanceQuerybody.
-
geoDistance
@Uncommitted public static GeoDistanceQuery geoDistance(Coordinate locationCoordinate, String distance)
Prepare aGeoDistanceQuerybody.
-
geoPolygon
@Uncommitted @SinceCouchbase("6.5.1") public static GeoPolygonQuery geoPolygon(List<Coordinate> coordinates)
Prepare aGeoPolygonQuerybody.
-
-