public class StructuredQueryBuilder extends Object
StructuredQueryDefinition
interface
as the type for query definitions. For instance, here is a
forward-compatible approach for capturing an AND query definition
in a variable:
StructuredQueryDefinition andQry = structuredQueryBuilder.and(... query definitions ...);
Modifier and Type | Class and Description |
---|---|
class |
StructuredQueryBuilder.AndNotQuery
Deprecated.
Use the
StructuredQueryDefinition interface
as the type for instances of AndNotQuery. |
class |
StructuredQueryBuilder.AndQuery
Deprecated.
Use the
StructuredQueryDefinition interface
as the type for instances of AndQuery. |
static interface |
StructuredQueryBuilder.Attribute
An Attribute represents an attribute in database documents.
|
class |
StructuredQueryBuilder.Box
Deprecated.
Use the Region interface as the type for instances of Box.
|
class |
StructuredQueryBuilder.Circle
Deprecated.
Use the Region interface as the type for instances of Circle.
|
class |
StructuredQueryBuilder.CollectionConstraintQuery
Deprecated.
Use the
StructuredQueryDefinition interface
as the type for instances of CollectionConstraintQuery. |
class |
StructuredQueryBuilder.CollectionQuery
Deprecated.
Use the
StructuredQueryDefinition interface
as the type for instances of CollectionQuery. |
static interface |
StructuredQueryBuilder.ContainerIndex
A ContainerIndex can be used for container queries.
|
class |
StructuredQueryBuilder.CustomConstraintQuery
Deprecated.
Use the
StructuredQueryDefinition interface
as the type for instances of CustomConstraintQuery. |
class |
StructuredQueryBuilder.DirectoryQuery
Deprecated.
Use the
StructuredQueryDefinition interface
as the type for instances of DirectoryQuery. |
class |
StructuredQueryBuilder.DocumentFragmentQuery
Deprecated.
Use the
StructuredQueryDefinition interface
as the type for instances of DocumentFragmentQuery. |
class |
StructuredQueryBuilder.DocumentQuery
Deprecated.
Use the
StructuredQueryDefinition interface
as the type for instances of DocumentQuery. |
static interface |
StructuredQueryBuilder.Element
An Element represents an element in database documents.
|
static interface |
StructuredQueryBuilder.ElementAttribute
An ElementAttribute represents an attribute on an element
in database documents.
|
class |
StructuredQueryBuilder.ElementConstraintQuery
Deprecated.
Use the
StructuredQueryDefinition interface
as the type for instances of ElementConstraintQuery. |
static interface |
StructuredQueryBuilder.Field
A Field represents a field defined in the database configuration.
|
static class |
StructuredQueryBuilder.FragmentScope
Whether a query should search the document or its associated properties.
|
class |
StructuredQueryBuilder.GeospatialConstraintQuery
Deprecated.
Use the
StructuredQueryDefinition interface
as the type for instances of GeospatialConstraintQuery. |
static interface |
StructuredQueryBuilder.GeospatialIndex
A GeospatialIndex can be used for geospatial queries.
|
static interface |
StructuredQueryBuilder.JSONKey
A JSONKey represents a key in JSON database documents.
|
class |
StructuredQueryBuilder.LocksQuery
Deprecated.
Use the
StructuredQueryDefinition interface
as the type for instances of LocksQuery. |
class |
StructuredQueryBuilder.NearQuery
Deprecated.
Use the
StructuredQueryDefinition interface
as the type for instances of NearQuery. |
class |
StructuredQueryBuilder.NotQuery
Deprecated.
Use the
StructuredQueryDefinition interface as the type for instances of NotQuery. |
static class |
StructuredQueryBuilder.Operator
A comparison operator for use in range queries.
|
static class |
StructuredQueryBuilder.Ordering
Control over ordering for use in near queries.
|
class |
StructuredQueryBuilder.OrQuery
Deprecated.
Use the
StructuredQueryDefinition interface as the type for instances of OrQuery. |
static interface |
StructuredQueryBuilder.PathIndex
A PathIndex represents an index defined with an XPath
in the database configuration.
|
class |
StructuredQueryBuilder.Point
Deprecated.
Treat the Point class as an interface that extends Region.
|
class |
StructuredQueryBuilder.Polygon
Deprecated.
Use the Region interface as the type for instances of Polygon.
|
class |
StructuredQueryBuilder.PropertiesConstraintQuery
Deprecated.
Use the
StructuredQueryDefinition interface
as the type for instances of PropertiesConstraintQuery. |
class |
StructuredQueryBuilder.PropertiesQuery
Deprecated.
Use the
StructuredQueryDefinition interface
as the type for instances of PropertiesQuery. |
class |
StructuredQueryBuilder.RangeConstraintQuery
Deprecated.
Use the
StructuredQueryDefinition interface
as the type for instances of RangeConstraintQuery. |
static interface |
StructuredQueryBuilder.RangeIndex
A RangeIndex can be used for range queries.
|
static interface |
StructuredQueryBuilder.Region
A region matched by a geospatial query.
|
class |
StructuredQueryBuilder.TermQuery
Deprecated.
Use the
StructuredQueryDefinition interface
as the type for instances of TermQuery. |
static interface |
StructuredQueryBuilder.TextIndex
A TextIndex can be used for word and value queries.
|
class |
StructuredQueryBuilder.ValueConstraintQuery
Deprecated.
Use the
StructuredQueryDefinition interface
as the type for instances of ValueConstraintQuery. |
class |
StructuredQueryBuilder.WordConstraintQuery
Deprecated.
Use the
StructuredQueryDefinition interface
as the type for instances of WordConstraintQuery. |
Constructor and Description |
---|
StructuredQueryBuilder()
Zero-argument constructor.
|
StructuredQueryBuilder(IterableNamespaceContext namespaces)
Constructs a query builder for queries using the specified
namespace bindings.
|
StructuredQueryBuilder(String optionsName)
Constructs a query builder for queries against the options
persisted with the specified name.
|
StructuredQueryBuilder(String optionsName,
IterableNamespaceContext namespaces)
Constructs a query builder for queries against the options
persisted with the specified name using the specified
namespace bindings.
|
Modifier and Type | Method and Description |
---|---|
StructuredQueryBuilder.AndQuery |
and(StructuredQueryDefinition... queries)
Defines an AND query over the list of query definitions.
|
StructuredQueryBuilder.AndNotQuery |
andNot(StructuredQueryDefinition positive,
StructuredQueryDefinition negative)
Defines an AND NOT query combining a positive and negative
query.
|
StructuredQueryBuilder.Attribute |
attribute(QName qname)
Identifies a namespaced attribute to match with a query.
|
StructuredQueryBuilder.Attribute |
attribute(String name)
Identifies a simple attribute to match with a query.
|
StructuredQueryDefinition |
boost(StructuredQueryDefinition matchingQuery,
StructuredQueryDefinition boostingQuery)
Defines a boost query for the matching and boosting query definitions.
|
StructuredQueryBuilder.Box |
box(double south,
double west,
double north,
double east)
Specifies a geospatial region as a box, supplying
the coordinates for the perimeter.
|
RawStructuredQueryDefinition |
build(StructuredQueryDefinition... queries)
Builds a structured query in XML from the list of query definitions.
|
StructuredQueryBuilder.Circle |
circle(double latitude,
double longitude,
double radius)
Specifies a geospatial region as a circle,
supplying coordinates for the center.
|
StructuredQueryBuilder.Circle |
circle(StructuredQueryBuilder.Point center,
double radius)
Specifies a geospatial region as a circle,
supplying a point for the center.
|
StructuredQueryBuilder.CollectionQuery |
collection(String... uris)
Matches documents belonging to at least one
of the criteria collections.
|
StructuredQueryBuilder.CollectionConstraintQuery |
collectionConstraint(String constraintName,
String... uris)
Matches documents belonging to at least one
of the criteria collections with the specified constraint.
|
StructuredQueryDefinition |
containerConstraint(String constraintName,
StructuredQueryDefinition query)
Matches a query within the substructure of the container specified
by the constraint.
|
StructuredQueryDefinition |
containerQuery(StructuredQueryBuilder.ContainerIndex index,
StructuredQueryDefinition query)
Matches a query within the substructure contained by an element or JSON key.
|
StructuredQueryBuilder.CustomConstraintQuery |
customConstraint(String constraintName,
String... text)
Matches documents as specified by a constraint that implements
a custom query parameterized with the supplied text.
|
StructuredQueryBuilder.DirectoryQuery |
directory(boolean isInfinite,
String... uris)
Matches documents at the specified depth within at least one
of the criteria directories.
|
StructuredQueryBuilder.DirectoryQuery |
directory(int depth,
String... uris)
Matches documents at the specified depth within at least one
of the criteria directories.
|
StructuredQueryBuilder.DocumentQuery |
document(String... uris)
Matches the specified documents.
|
StructuredQueryBuilder.DocumentFragmentQuery |
documentFragment(StructuredQueryDefinition query)
Associates a query with the content of documents (as opposed to
the properties of documents).
|
StructuredQueryBuilder.Element |
element(QName qname)
Identifies a namespaced element to match with a query.
|
StructuredQueryBuilder.Element |
element(String name)
Identifies a simple element to match with a query.
|
StructuredQueryBuilder.ElementAttribute |
elementAttribute(StructuredQueryBuilder.Element element,
StructuredQueryBuilder.Attribute attribute)
Identifies an element having an attribute to match with a query.
|
StructuredQueryBuilder.ElementConstraintQuery |
elementConstraint(String constraintName,
StructuredQueryDefinition query)
Deprecated.
Matches a query within the substructure of the container specified
by the constraint.
This method is deprecated in favor of the more general
containerConstraint() method. |
StructuredQueryBuilder.Field |
field(String name)
Identifies a field to match with a query.
|
StructuredQueryBuilder.GeospatialIndex |
geoAttributePair(StructuredQueryBuilder.Element parent,
StructuredQueryBuilder.Attribute lat,
StructuredQueryBuilder.Attribute lon)
Identifies a parent element with child latitude and longitude attributes
to match with a geospatial query.
|
StructuredQueryBuilder.GeospatialIndex |
geoElement(StructuredQueryBuilder.Element element)
Identifies an element whose text has the latitude and longitude
coordinates to match with a geospatial query.
|
StructuredQueryBuilder.GeospatialIndex |
geoElement(StructuredQueryBuilder.Element parent,
StructuredQueryBuilder.Element element)
Identifies a parent element with a child element whose text has
the latitude and longitude coordinates to match with a geospatial query.
|
StructuredQueryBuilder.GeospatialIndex |
geoElementPair(StructuredQueryBuilder.Element parent,
StructuredQueryBuilder.Element lat,
StructuredQueryBuilder.Element lon)
Identifies a parent element with child latitude and longitude elements
to match with a geospatial query.
|
StructuredQueryBuilder.GeospatialIndex |
geoPath(StructuredQueryBuilder.PathIndex pathIndex)
Identifies a path with the latitude and longitude to match
with a geospatial query.
|
StructuredQueryDefinition |
geospatial(StructuredQueryBuilder.GeospatialIndex index,
StructuredQueryBuilder.FragmentScope scope,
String[] options,
StructuredQueryBuilder.Region... regions)
Matches an element, element pair, element attribute, pair, or path
specifying a geospatial point that appears within one of the criteria regions.
|
StructuredQueryDefinition |
geospatial(StructuredQueryBuilder.GeospatialIndex index,
StructuredQueryBuilder.Region... regions)
Matches an element, element pair, element attribute, pair, or path
specifying a geospatial point that appears within one of the criteria regions.
|
StructuredQueryBuilder.GeospatialConstraintQuery |
geospatialConstraint(String constraintName,
StructuredQueryBuilder.Region... regions)
Matches the container specified by the constraint
whose geospatial point appears within one of the criteria regions.
|
IterableNamespaceContext |
getNamespaces()
Gets the namespace bindings used for the query.
|
StructuredQueryBuilder.JSONKey |
jsonKey(String name)
Identifies a JSON key to match with a query.
|
StructuredQueryBuilder.LocksQuery |
locks(StructuredQueryDefinition query)
Associates a query with durable locks on documents (as opposed to
the content or properties of documents).
|
StructuredQueryBuilder.NearQuery |
near(int distance,
double weight,
StructuredQueryBuilder.Ordering order,
StructuredQueryDefinition... queries)
Defines a NEAR query over the list of query definitions
with specified parameters.
|
StructuredQueryBuilder.NearQuery |
near(StructuredQueryDefinition... queries)
Defines a NEAR query over the list of query definitions
with default parameters.
|
StructuredQueryBuilder.NotQuery |
not(StructuredQueryDefinition query)
Defines a NOT query for a query definition.
|
StructuredQueryDefinition |
notIn(StructuredQueryDefinition positive,
StructuredQueryDefinition negative)
Defines a not-in query for the positive and negative query definitions.
|
StructuredQueryBuilder.OrQuery |
or(StructuredQueryDefinition... queries)
Defines an OR query over the list of query definitions.
|
StructuredQueryBuilder.PathIndex |
pathIndex(String path)
Identifies a path index to match with a query.
|
StructuredQueryBuilder.Point |
point(double latitude,
double longitude)
Specifies a geospatial point.
|
StructuredQueryBuilder.Polygon |
polygon(StructuredQueryBuilder.Point... points)
Specifies a geospatial region as an arbitrary polygon.
|
StructuredQueryBuilder.PropertiesQuery |
properties(StructuredQueryDefinition query)
Associates a query with the properties of documents (as opposed to
the content of documents).
|
StructuredQueryBuilder.PropertiesConstraintQuery |
propertiesConstraint(String constraintName,
StructuredQueryDefinition query)
Associates a query with the properties of documents (as opposed to
the content of documents) with the specified constraint.
|
StructuredQueryDefinition |
range(StructuredQueryBuilder.RangeIndex index,
String type,
String[] options,
StructuredQueryBuilder.Operator operator,
Object... values)
Matches an element, attribute, json key, field, or path
whose value that has the correct datatyped comparison with
one of the criteria values.
|
StructuredQueryDefinition |
range(StructuredQueryBuilder.RangeIndex index,
String type,
String collation,
String[] options,
StructuredQueryBuilder.Operator operator,
Object... values)
Matches an element, attribute, json key, field, or path
whose value that has the correct datatyped comparison with
one of the criteria values.
|
StructuredQueryDefinition |
range(StructuredQueryBuilder.RangeIndex index,
String type,
String collation,
StructuredQueryBuilder.FragmentScope scope,
String[] options,
StructuredQueryBuilder.Operator operator,
Object... values)
Matches an element, attribute, json key, field, or path
whose value that has the correct datatyped comparison with
one of the criteria values.
|
StructuredQueryDefinition |
range(StructuredQueryBuilder.RangeIndex index,
String type,
String collation,
StructuredQueryBuilder.FragmentScope scope,
StructuredQueryBuilder.Operator operator,
Object... values)
Matches an element, attribute, json key, field, or path
whose value that has the correct datatyped comparison with
one of the criteria values.
|
StructuredQueryDefinition |
range(StructuredQueryBuilder.RangeIndex index,
String type,
String collation,
StructuredQueryBuilder.Operator operator,
Object... values)
Matches an element, attribute, json key, field, or path
whose value that has the correct datatyped comparison with
one of the criteria values.
|
StructuredQueryDefinition |
range(StructuredQueryBuilder.RangeIndex index,
String type,
StructuredQueryBuilder.Operator operator,
Object... values)
Matches an element, attribute, json key, field, or path
whose value that has the correct datatyped comparison with
one of the criteria values.
|
StructuredQueryBuilder.RangeConstraintQuery |
rangeConstraint(String constraintName,
StructuredQueryBuilder.Operator operator,
String... values)
Matches the container specified by the constraint
whose value that has the correct datatyped comparison with
one of the criteria values.
|
String[] |
rangeOptions(String... options)
Converts the list of options used for a range query to an array
as a convenience.
|
void |
setNamespaces(IterableNamespaceContext namespaces)
Specifies the namespace bindings used for the query.
|
StructuredQueryBuilder.TermQuery |
term(double weight,
String... terms)
Matches documents containing the specified terms, modifying
the contribution of the match to the score with the weight.
|
StructuredQueryBuilder.TermQuery |
term(String... terms)
Matches documents containing the specified terms.
|
StructuredQueryDefinition |
value(StructuredQueryBuilder.TextIndex index,
String... values)
Matches an element, attribute, json key, or field
that has a value with the same words as at least one
of the criteria values.
|
StructuredQueryDefinition |
value(StructuredQueryBuilder.TextIndex index,
StructuredQueryBuilder.FragmentScope scope,
String[] options,
double weight,
String... values)
Matches an element, attribute, json key, or field
that has a value with the same words as at least one
of the criteria values.
|
StructuredQueryBuilder.ValueConstraintQuery |
valueConstraint(String constraintName,
double weight,
String... values)
Matches the container specified by the constraint when it
has a value with the same words as at least one
of the criteria values.
|
StructuredQueryBuilder.ValueConstraintQuery |
valueConstraint(String constraintName,
String... values)
Matches the container specified by the constraint when it
has a value with the same words as at least one
of the criteria values.
|
StructuredQueryDefinition |
word(StructuredQueryBuilder.TextIndex index,
String... words)
Matches an element, attribute, json key, or field
that has at least one of the criteria words.
|
StructuredQueryDefinition |
word(StructuredQueryBuilder.TextIndex index,
StructuredQueryBuilder.FragmentScope scope,
String[] options,
double weight,
String... words)
Matches an element, attribute, json key, or field
that has at least one of the criteria words.
|
StructuredQueryBuilder.WordConstraintQuery |
wordConstraint(String constraintName,
double weight,
String... words)
Matches the container specified by the constraint when it
has at least one of the criteria words.
|
StructuredQueryBuilder.WordConstraintQuery |
wordConstraint(String constraintName,
String... words)
Matches the container specified by the constraint when it
has at least one of the criteria words.
|
public StructuredQueryBuilder()
public StructuredQueryBuilder(String optionsName)
optionsName
- the name of the persisted query optionspublic StructuredQueryBuilder(IterableNamespaceContext namespaces)
namespaces
- the bindings of prefixes and namespacespublic StructuredQueryBuilder(String optionsName, IterableNamespaceContext namespaces)
optionsName
- the name of the persisted query optionsnamespaces
- the bindings of prefixes and namespacespublic RawStructuredQueryDefinition build(StructuredQueryDefinition... queries)
queries
- the query definitionspublic StructuredQueryBuilder.AndQuery and(StructuredQueryDefinition... queries)
queries
- the query definitionspublic StructuredQueryBuilder.OrQuery or(StructuredQueryDefinition... queries)
queries
- the query definitionspublic StructuredQueryBuilder.NotQuery not(StructuredQueryDefinition query)
query
- the query definitionpublic StructuredQueryBuilder.AndNotQuery andNot(StructuredQueryDefinition positive, StructuredQueryDefinition negative)
positive
- the positive query definitionnegative
- the negative query definitionpublic StructuredQueryBuilder.NearQuery near(StructuredQueryDefinition... queries)
queries
- the query definitionspublic StructuredQueryBuilder.NearQuery near(int distance, double weight, StructuredQueryBuilder.Ordering order, StructuredQueryDefinition... queries)
distance
- the proximity for the query termsweight
- the weight for the queryorder
- the ordering for the query termsqueries
- the query definitionspublic StructuredQueryBuilder.DocumentFragmentQuery documentFragment(StructuredQueryDefinition query)
query
- the query definitionpublic StructuredQueryBuilder.PropertiesQuery properties(StructuredQueryDefinition query)
query
- the query definitionpublic StructuredQueryBuilder.LocksQuery locks(StructuredQueryDefinition query)
query
- the query definitionpublic StructuredQueryDefinition containerQuery(StructuredQueryBuilder.ContainerIndex index, StructuredQueryDefinition query)
index
- the element or JSON keyquery
- the query over the contained substructurepublic StructuredQueryBuilder.CollectionQuery collection(String... uris)
uris
- the identifiers for the criteria collectionspublic StructuredQueryBuilder.DirectoryQuery directory(boolean isInfinite, String... uris)
isInfinite
- true to match a document at any level of depthuris
- the identifiers for the criteria directoriespublic StructuredQueryBuilder.DirectoryQuery directory(int depth, String... uris)
depth
- specifies how many subdirectories deep to traverse
A value of 1 means to exclude subdirectories.uris
- the identifiers for the criteria directoriespublic StructuredQueryBuilder.DocumentQuery document(String... uris)
uris
- the identifiers for the documentspublic StructuredQueryBuilder.TermQuery term(String... terms)
terms
- the possible terms to matchpublic StructuredQueryBuilder.TermQuery term(double weight, String... terms)
weight
- the multiplier for the match in the document rankingterms
- the possible terms to matchpublic StructuredQueryDefinition value(StructuredQueryBuilder.TextIndex index, String... values)
index
- the value containervalues
- the possible values to matchpublic StructuredQueryDefinition value(StructuredQueryBuilder.TextIndex index, StructuredQueryBuilder.FragmentScope scope, String[] options, double weight, String... values)
index
- the value containerscope
- whether the query matches the document content or propertiesoptions
- options for fine tuning the queryweight
- the multiplier for the match in the document rankingvalues
- the possible values to matchpublic StructuredQueryDefinition word(StructuredQueryBuilder.TextIndex index, String... words)
index
- the word containerwords
- the possible words to matchpublic StructuredQueryDefinition word(StructuredQueryBuilder.TextIndex index, StructuredQueryBuilder.FragmentScope scope, String[] options, double weight, String... words)
index
- the word containerscope
- whether the query matches the document content or propertiesoptions
- options for fine tuning the queryweight
- the multiplier for the match in the document rankingwords
- the possible words to matchpublic StructuredQueryDefinition range(StructuredQueryBuilder.RangeIndex index, String type, StructuredQueryBuilder.Operator operator, Object... values)
index
- the range containertype
- the datatype of the container and specified valuesoperator
- the comparison with the criteria valuesvalues
- the possible datatyped values for the comparisonpublic StructuredQueryDefinition range(StructuredQueryBuilder.RangeIndex index, String type, String collation, StructuredQueryBuilder.Operator operator, Object... values)
index
- the range containertype
- collation
- the identifier for the strategy for comparing typesoperator
- the comparison with the criteria valuesvalues
- the possible datatyped values for the comparisonpublic StructuredQueryDefinition range(StructuredQueryBuilder.RangeIndex index, String type, String collation, StructuredQueryBuilder.FragmentScope scope, StructuredQueryBuilder.Operator operator, Object... values)
index
- the range containertype
- collation
- the identifier for the strategy for comparing typesscope
- whether the query matches the document content or propertiesoperator
- the comparison with the criteria valuesvalues
- the possible datatyped values for the comparisonpublic StructuredQueryDefinition range(StructuredQueryBuilder.RangeIndex index, String type, String[] options, StructuredQueryBuilder.Operator operator, Object... values)
index
- the range containertype
- the datatype of the container and specified valuesoptions
- options for fine tuning the queryoperator
- the comparison with the criteria valuesvalues
- the possible datatyped values for the comparisonpublic StructuredQueryDefinition range(StructuredQueryBuilder.RangeIndex index, String type, String collation, String[] options, StructuredQueryBuilder.Operator operator, Object... values)
index
- the range containertype
- collation
- the identifier for the strategy for comparing typesoptions
- options for fine tuning the queryoperator
- the comparison with the criteria valuesvalues
- the possible datatyped values for the comparisonpublic StructuredQueryDefinition range(StructuredQueryBuilder.RangeIndex index, String type, String collation, StructuredQueryBuilder.FragmentScope scope, String[] options, StructuredQueryBuilder.Operator operator, Object... values)
index
- the range containertype
- collation
- the identifier for the strategy for comparing typesscope
- whether the query matches the document content or propertiesoptions
- options for fine tuning the queryoperator
- the comparison with the criteria valuesvalues
- the possible datatyped values for the comparisonpublic StructuredQueryDefinition geospatial(StructuredQueryBuilder.GeospatialIndex index, StructuredQueryBuilder.Region... regions)
index
- the container for the coordinates of the geospatial pointregions
- the possible regions containing the pointpublic StructuredQueryDefinition geospatial(StructuredQueryBuilder.GeospatialIndex index, StructuredQueryBuilder.FragmentScope scope, String[] options, StructuredQueryBuilder.Region... regions)
index
- the container for the coordinates of the geospatial pointscope
- whether the query matches the document content or propertiesoptions
- options for fine tuning the queryregions
- the possible regions containing the pointpublic StructuredQueryBuilder.Element element(QName qname)
qname
- the name of the elementpublic StructuredQueryBuilder.Element element(String name)
name
- the name of the elementpublic StructuredQueryBuilder.Attribute attribute(QName qname)
qname
- the name of the attributepublic StructuredQueryBuilder.Attribute attribute(String name)
name
- the name of the attributepublic StructuredQueryBuilder.ElementAttribute elementAttribute(StructuredQueryBuilder.Element element, StructuredQueryBuilder.Attribute attribute)
element
- the element identifierattribute
- the attribute identifierpublic StructuredQueryBuilder.Field field(String name)
name
- the name of the fieldpublic StructuredQueryBuilder.JSONKey jsonKey(String name)
name
- the name of the JSON keypublic StructuredQueryBuilder.PathIndex pathIndex(String path)
path
- the indexed pathpublic StructuredQueryBuilder.GeospatialIndex geoElement(StructuredQueryBuilder.Element element)
element
- the element containing the geospatial coordinatespublic StructuredQueryBuilder.GeospatialIndex geoElement(StructuredQueryBuilder.Element parent, StructuredQueryBuilder.Element element)
parent
- the parent of the element with the coordinateselement
- the element containing the geospatial coordinatespublic StructuredQueryBuilder.GeospatialIndex geoElementPair(StructuredQueryBuilder.Element parent, StructuredQueryBuilder.Element lat, StructuredQueryBuilder.Element lon)
parent
- the parent of the element with the coordinateslat
- the element with the latitude coordinatelon
- the element with the longitude coordinatepublic StructuredQueryBuilder.GeospatialIndex geoAttributePair(StructuredQueryBuilder.Element parent, StructuredQueryBuilder.Attribute lat, StructuredQueryBuilder.Attribute lon)
parent
- the parent of the element with the coordinateslat
- the attribute with the latitude coordinatelon
- the attribute with the longitude coordinatepublic StructuredQueryBuilder.GeospatialIndex geoPath(StructuredQueryBuilder.PathIndex pathIndex)
pathIndex
- the indexed pathpublic StructuredQueryBuilder.Point point(double latitude, double longitude)
latitude
- the latitude coordinatelongitude
- the longitude coordinatepublic StructuredQueryBuilder.Circle circle(double latitude, double longitude, double radius)
latitude
- the latitude coordinate of the centerlongitude
- the longitude coordinate of the centerradius
- the radius of the circlepublic StructuredQueryBuilder.Circle circle(StructuredQueryBuilder.Point center, double radius)
center
- the point defining the centerradius
- the radius of the circlepublic StructuredQueryBuilder.Box box(double south, double west, double north, double east)
south
- the latitude of the south coordinatewest
- the longitude of the west coordinatenorth
- the latitude of the north coordinateeast
- the longitude of the east coordinatepublic StructuredQueryBuilder.Polygon polygon(StructuredQueryBuilder.Point... points)
points
- the list of points defining the perimeter of the regionpublic StructuredQueryDefinition containerConstraint(String constraintName, StructuredQueryDefinition query)
constraintName
- the constraint definitionquery
- the query definition@Deprecated public StructuredQueryBuilder.ElementConstraintQuery elementConstraint(String constraintName, StructuredQueryDefinition query)
containerConstraint()
method.constraintName
- the constraint definitionquery
- the query definitionpublic StructuredQueryBuilder.PropertiesConstraintQuery propertiesConstraint(String constraintName, StructuredQueryDefinition query)
constraintName
- the constraint definitionquery
- the query definitionpublic StructuredQueryBuilder.CollectionConstraintQuery collectionConstraint(String constraintName, String... uris)
constraintName
- the constraint definitionuris
- the identifiers for the criteria collectionspublic StructuredQueryBuilder.ValueConstraintQuery valueConstraint(String constraintName, String... values)
constraintName
- the constraint definitionvalues
- the possible values to matchpublic StructuredQueryBuilder.ValueConstraintQuery valueConstraint(String constraintName, double weight, String... values)
constraintName
- the constraint definitionweight
- the multiplier for the match in the document rankingvalues
- the possible values to matchpublic StructuredQueryBuilder.WordConstraintQuery wordConstraint(String constraintName, String... words)
constraintName
- the constraint definitionwords
- the possible words to matchpublic StructuredQueryBuilder.WordConstraintQuery wordConstraint(String constraintName, double weight, String... words)
constraintName
- the constraint definitionweight
- the multiplier for the match in the document rankingwords
- the possible words to matchpublic StructuredQueryBuilder.RangeConstraintQuery rangeConstraint(String constraintName, StructuredQueryBuilder.Operator operator, String... values)
constraintName
- the constraint definitionoperator
- the comparison with the criteria valuesvalues
- the possible datatyped values for the comparisonpublic StructuredQueryBuilder.GeospatialConstraintQuery geospatialConstraint(String constraintName, StructuredQueryBuilder.Region... regions)
constraintName
- the constraint definitionregions
- the possible regions containing the pointpublic StructuredQueryBuilder.CustomConstraintQuery customConstraint(String constraintName, String... text)
constraintName
- the constraint definitiontext
- the input to the custom querypublic String[] rangeOptions(String... options)
options
- the list of range query optionspublic StructuredQueryDefinition boost(StructuredQueryDefinition matchingQuery, StructuredQueryDefinition boostingQuery)
matchingQuery
- the query definition that filters documentsboostingQuery
- the query definition that increases the rank for some filtered documentspublic StructuredQueryDefinition notIn(StructuredQueryDefinition positive, StructuredQueryDefinition negative)
positive
- the query definition that includes documentsnegative
- the query definition that excludes documentspublic IterableNamespaceContext getNamespaces()
public void setNamespaces(IterableNamespaceContext namespaces)
EditableNamespaceContext
class to instantiate a set of bindings between namespace prefixes and Uris.namespaces
- the namespace bindingsCopyright © 2013-2015 MarkLogic Corporation.