Namespace: valuesBuilder
valuesBuilder
A helper for building the definition of a
values query, which projects tuples (aka rows) of values out of
documents. The helper is created by the marklogic.valuesBuilder
function. You must call the valuesBuilder#fromIndexes
function to supply the required clause of the values query before
calling the valuesBuilder.BuiltQuery#where,
valuesBuilder.BuiltQuery#aggregates,
valuesBuilder.BuiltQuery#slice,
or valuesBuilder.BuiltQuery#withOptions
functions to specify the optional clauses of the built query.
Namespaces
Methods
-
-
and(subquery, ordering) → {queryBuilder.Query}
-
Builds a query for the intersection of the subqueries.
Parameters:
Name Type Argument Description subqueryqueryBuilder.Query <repeatable>
a word, value, range, geospatial, or other query or a composer such as an or query. orderingqueryBuilder.OrderParam <optional>
the ordering on the subqueries returned from queryBuilder#ordered - Since:
-
- 1.0
Returns:
a composable query- Type
- queryBuilder.Query
-
-
andNot(positiveQuery, negativeQuery) → {queryBuilder.Query}
-
Builds a query with positive and negative subqueries.
Parameters:
Name Type Description positiveQueryqueryBuilder.Query a query that must match the result documents negativeQueryqueryBuilder.Query a query that must not match the result documents - Since:
-
- 1.0
Returns:
a composable query- Type
- queryBuilder.Query
-
-
attribute(element, attribute) → {queryBuilder.IndexedName}
-
Specifies an XML attribute for a query. A name without a namespace can be expressed as a string. A namespaced name can be expressed as a two-item array with uri and name strings or as an object returned by the queryBuilder#qname function.
Parameters:
Name Type Description elementstring | Array.<string> | queryBuilder.QName the name of the element attributestring | Array.<string> | queryBuilder.QName the name of the attribute - Since:
-
- 1.0
Returns:
an indexed name for specifying a query -
-
boost(matchingQuery, boostingQuery) → {queryBuilder.Query}
-
Builds a query with matching and boosting subqueries.
Parameters:
Name Type Description matchingQueryqueryBuilder.Query a query that must match the result documents boostingQueryqueryBuilder.Query a query that increases the ranking when qualifying result documents - Since:
-
- 1.0
Returns:
a composable query- Type
- queryBuilder.Query
-
-
box(south, west, north, east) → {queryBuilder.Region}
-
Specifies a rectangular region with the coordinates of the corners. The coordinates can be specified either by passing the return value from the queryBuilder#southWestNorthEast function or as a list of {queryBuilder.LatLon} coordinates in South, West, North, and East order.
Parameters:
Name Type Description southqueryBuilder.LatLon the south coordinate of the box westqueryBuilder.LatLon the west coordinate for the box northqueryBuilder.LatLon the north coordinate for the box eastqueryBuilder.LatLon the east coordinate for the box - Since:
-
- 1.0
Returns:
the region criteria for a geospatial query- Type
- queryBuilder.Region
-
-
circle(radius, center) → {queryBuilder.Region}
-
Specifies a circular region based on a radius and the coordinate of the center. The coordinate can either be specified by passing the return value from the queryBuilder#latlon function or by passing the latitude and longitude numbers in that order (possibly wrapped in an array).
Parameters:
Name Type Description radiusnumber the radius for the circle centerqueryBuilder.LatLon the center for the circle - Since:
-
- 1.0
Returns:
the region criteria for a geospatial query- Type
- queryBuilder.Region
-
-
collection(collections, prefix) → {queryBuilder.Query}
-
Builds a query matching documents in one or more collections as part of a document query. The collections can be specified as arguments or parsed from a query string based on a binding. Also, as part of a values query, the collection() function identifies the collection index without supplying criteria. In a values query, the tuples (aka rows) projected from each document have a column whose values are the collections to which the document belongs.
Parameters:
Name Type Argument Description collectionsstring | Array.<string> | queryBuilder.BindingParam either one or more collection uris to match or exactly one binding (returned by the queryBuilder#bind function) for parsing the collection uris from a query string; required except for values queries prefixstring <optional>
a prefix to prepend to each value provided by the parsed query string; can be provided only when providing a binding - Since:
-
- 1.0
Returns:
a composable query- Type
- queryBuilder.Query
-
-
copyFrom(query) → {valuesBuilder.BuiltQuery}
-
Initializes a new values builder by copying the from indexes clause and any where, aggregates, slice, or withOptions clause defined in the built query.
Parameters:
Name Type Description queryvaluesBuilder.BuiltQuery an existing values query with clauses to copy - Since:
-
- 1.0
Returns:
a built query -
-
datatype(datatype, collation) → {queryBuilder.DatatypeParam}
-
Identifies the datatype of an index.
Parameters:
Name Type Argument Description datatypestring a value from the enumeration int|unsignedInt|long|unsignedLong|float|double|decimal|dateTime|time|date|gYearMonth|gYear|gMonth|gDay|yearMonthDuration|dayTimeDuration|string|anyURI|point collationstring <optional>
a URI identifying the comparison method for a string or anyURI datatype - Since:
-
- 1.0
Returns:
a datatype specification -
-
directory(uris, infinite) → {queryBuilder.Query}
-
Builds a query matching documents in one or more database directories.
Parameters:
Name Type Argument Description urisstring | Array.<string> one or more directory uris to match infiniteboolean <optional>
whether to match documents at the top level or at any level of depth within the specified directories - Since:
-
- 1.0
Returns:
a composable query- Type
- queryBuilder.Query
-
-
document(uris) → {queryBuilder.Query}
-
Builds a query matching documents.
Parameters:
Name Type Description urisstring | Array.<string> one or more document uris to match - Since:
-
- 1.0
Returns:
a composable query- Type
- queryBuilder.Query
-
-
documentFragment(query) → {queryBuilder.Query}
-
Builds a query that applies the subquery to document content by contrast with the queryBuilder#properties function.
Parameters:
Name Type Description queryqueryBuilder.Query the query that must match document content - Since:
-
- 1.0
Returns:
a composable query- Type
- queryBuilder.Query
-
-
element(name) → {queryBuilder.IndexedName}
-
Specifies an XML element for a query. A name without a namespace can be expressed as a string. A namespaced name can be expressed as a two-item array with uri and name strings or as an object returned by the queryBuilder#qname function.
Parameters:
Name Type Description namestring | Array.<string> | queryBuilder.QName the name of the element - Since:
-
- 1.0
Returns:
an indexed name for specifying a query -
-
falseQuery() → {queryBuilder.Query}
-
Builds a query that matches no documents.
- Since:
-
- 2.0.1
Returns:
a composable query- Type
- queryBuilder.Query
-
-
field(name, collation) → {queryBuilder.IndexedName}
-
Specifies a field for a query.
Parameters:
Name Type Argument Description namestring the name of the field collationstring <optional>
the collation of a field over strings - Since:
-
- 1.0
Returns:
an indexed name for specifying a query -
-
fragmentScope(scopeType) → {queryBuilder.FragmentScopeParam}
-
Configures a query to match documents based on document content or document metadata properties.
Parameters:
Name Type Description scopeTypestring a value from the documents|properties enumeration where 'documents' queries document content and 'properties' queries document metadata properties - Since:
-
- 1.0
Returns:
a fragment scope specification -
-
fromIndexes(indexes) → {valuesBuilder.BuiltQuery}
-
Specifies the range or geospatial indexes or collection or uri lexicons from which to project columns in the response for the values query. The response has a tuple (aka row) for each co-occurrence of these indexes in the documents selected by the where clause. This function must be called on the values builder.
Parameters:
Name Type Description indexesstring | valuesBuilder.DatatypedValuesIndex a list of parameters or array specifying the JSON properties, XML elements or attributes, fields, or paths providing the range or geospatial indexes or the return value from the collection() or uri() helper functions to specify those lexicons. - Since:
-
- 1.0
Returns:
a built query -
-
geoAttributePair(parent, latitude, longitude) → {queryBuilder.GeoLocation}
-
Specifies the geospatial locations represented by an XML attribute pair for passing to the queryBuilder#geospatial function.
Parameters:
Name Type Description parentstring | queryBuilder.QName the name of the element containing the attributes as returned by the queryBuilder#qname function latitudestring | queryBuilder.QName the name of the latitude attribute as returned by the queryBuilder#qname function longitudestring | queryBuilder.QName the name of the longitude attribute as returned by the queryBuilder#qname function - Since:
-
- 1.0
Returns:
the specification for the geospatial locations -
-
geoElement(parent, element) → {queryBuilder.GeoLocation}
-
Specifies the geospatial locations represented by an XML element containing a comma-separated pair of latitude-longitude values for passing to the queryBuilder#geospatial function.
Parameters:
Name Type Argument Description parentstring | queryBuilder.QName <optional>
the optional name of the parent of the geospatial element as returned by the queryBuilder#qname function elementstring | queryBuilder.QName the name of the element as returned by the queryBuilder#qname function - Since:
-
- 1.0
Returns:
the specification for the geospatial locations -
-
geoElementPair(parent, latitude, longitude) → {queryBuilder.GeoLocation}
-
Specifies the geospatial locations represented by an XML element pair for passing to the queryBuilder#geospatial function.
Parameters:
Name Type Description parentstring | queryBuilder.QName the name of the containing parent element as returned by the queryBuilder#qname function latitudestring | queryBuilder.QName the name of the latitude element as returned by the queryBuilder#qname function longitudestring | queryBuilder.QName the name of the longitude element as returned by the queryBuilder#qname function - Since:
-
- 1.0
Returns:
the specification for the geospatial locations -
-
geoOptions(options) → {queryBuilder.GeoOptionsParam}
-
Provides options modifying the default behavior of a queryBuilder#geospatial query.
Parameters:
Name Type Argument Description optionsstring <repeatable>
options supported for geospatial queries - Since:
-
- 1.0
Returns:
options for the geospatial query -
-
geoPath(path, namespaces, coordSystem) → {queryBuilder.GeoLocation}
-
Specifies the geospatial locations represented by a path index on JSON properties or XML elements containing a pair of latitude-longitude values for passing to the queryBuilder#geospatial function.
Parameters:
Name Type Description pathstring | object the XPath for the path index as a string or as the return value of the queryBuilder#pathIndex function namespacesobject bindings between the prefixes in the path and namespace URIs coordSystemqueryBuilder.CoordSystem the coordinate system for the index - Since:
-
- 1.0
Returns:
the specification for the geospatial locations -
-
geoProperty(parent, element) → {queryBuilder.GeoLocation}
-
Specifies the geospatial locations represented by a JSON property containing a pair of latitude-longitude values for passing to the queryBuilder#geospatial function.
Parameters:
Name Type Argument Description parentstring <optional>
the optional name of the parent of the geospatial property elementstring the name of the geospatial property - Since:
-
- 1.0
Returns:
the specification for the geospatial locations -
-
geoPropertyPair(parent, latitude, longitude) → {queryBuilder.GeoLocation}
-
Specifies the geospatial locations represented by a JSON property pair for passing to the queryBuilder#geospatial function.
Parameters:
Name Type Description parentstring the name of the containing parent property latitudestring the name of the latitude property longitudestring the name of the longitude property - Since:
-
- 1.0
Returns:
the specification for the geospatial locations -
-
geospatial(location, weight, fragmentScope, geoOptions, criteria) → {queryBuilder.Query}
-
Builds a geospatial query or facet against a geospatial point index. For a query, you must supply either the {queryBuilder.Region} criteria or a binding to parse the region criteria from a query string but not both.
Parameters:
Name Type Argument Description locationqueryBuilder.GeoLocation the JSON property or XML element representing the geospatial locations weightqueryBuilder.WeightParam <optional>
a weight returned by queryBuilder#weight to increase or decrease the score of the query relative to other queries in the complete search fragmentScopequeryBuilder.FragmentScopeParam <optional>
whether the query applies to document content (the default) or document metadata properties as returned by the queryBuilder#fragmentScope function geoOptionsqueryBuilder.GeoOptionsParam <optional>
a list of options returned by queryBuilder#geoOptions to modify the geospatial query criteriaqueryBuilder.Region | queryBuilder.BindingParam <optional>
either a point matching or region containing geospatial locations in the documents or a binding (returned by the queryBuilder#bind function) for parsing the point or region from a query string - Since:
-
- 1.0
Returns:
a composable query- Type
- queryBuilder.Query
-
-
heatmap(latdivs, londivs, south, west, north, east) → {queryBuilder.HeatMapParam}
-
Divides a geospatial box into a two-dimensional grid for calculating facets based on document counts for each cell within the grid. The coordinates of the box can be specified either by passing the return value from the queryBuilder#southWestNorthEast function or as a list of {queryBuilder.LatLon} coordinates in South, West, North, and East order.
Parameters:
Name Type Description latdivsnumber the number of latitude divisions in the grid londivsnumber the number of longitude divisions in the grid southqueryBuilder.LatLon the south coordinate of the box westqueryBuilder.LatLon the west coordinate for the box northqueryBuilder.LatLon the north coordinate for the box eastqueryBuilder.LatLon the east coordinate for the box - Since:
-
- 1.0
Returns:
the buckets for a geospatial facet -
-
latlon(latitude, longitude) → {queryBuilder.LatLon}
-
Specifies the latitude and longitude for a coordinate of the region criteria for a geospatial query. The latitude and longitude can be passed as individual numeric parameters or wrapped in an array
Parameters:
Name Type Description latitudenumber the north-south location longitudenumber the east-west location - Since:
-
- 1.0
Returns:
a coordinate for a {queryBuilder.Region}- Type
- queryBuilder.LatLon
-
-
locksFragment(query) → {queryBuilder.Query}
-
Builds a query that applies the subquery to document lock fragments by contrast with the queryBuilder#documentFragment function.
Parameters:
Name Type Description queryqueryBuilder.Query the query that must match document lock fragments - Since:
-
- 1.0
Returns:
a composable query- Type
- queryBuilder.Query
-
-
lsqtQuery(temporalCollection, weight, timestamp, temporalOptions) → {queryBuilder.Query}
-
Builds a query matching temporal documents with a system start time prior to the LSQT (Latest System Query Time). Advancing the LSQT can be done manually or on an automated basis to include more recent temporal documents in the result set.
Parameters:
Name Type Argument Description temporalCollectionstring the name of the temporal collection that retains the temporal documents weightqueryBuilder.WeightParam <optional>
a weight returned by queryBuilder#weight to increase or decrease the score of subqueries relative to other queries in the complete search timestampstring | Date <optional>
a datetime older than the LSQT to use as the upper boundary for an older view of the database temporalOptionsqueryBuilder.TemporalOptionsParam <optional>
a list of options returned by queryBuilder#temporalOptions to modify the temporal query - Since:
-
- 1.0
Returns:
a composable query- Type
- queryBuilder.Query
-
-
near(subquery, distance, weight, ordering, minDistance) → {queryBuilder.Query}
-
Builds a query that matches the subqueries within a specified proximity. Note that you may get false positives from a near query if you do not have the appropriate position index enabled or run the query unfiltered (which is the default). While turning on filtering can be convenient during development, setting up indexes is recommended for production.
Parameters:
Name Type Argument Description subqueryqueryBuilder.Query <repeatable>
a word, value, range, geospatial, or other query or a composer such as an or query. distancenumber <optional>
the maximum number of words between any two matching subqueries weightqueryBuilder.WeightParam <optional>
a weight returned by queryBuilder#weight to increase or decrease the score of subqueries relative to other queries in the complete search orderingqueryBuilder.OrderParam <optional>
the ordering on the subqueries returned from queryBuilder#ordered minDistancequeryBuilder.MinDistanceParam <optional>
the minimum distance between any two matching subqueries returned from queryBuilder#minDistance - Since:
-
- 1.0
Returns:
a composable query- Type
- queryBuilder.Query
-
-
not(subquery) → {queryBuilder.Query}
-
Builds a query that removes any documents matched by the subquery.
Parameters:
Name Type Description subqueryqueryBuilder.Query a word, value, range, geospatial, or other query or a composer such as an or query. - Since:
-
- 1.0
Returns:
a composable query- Type
- queryBuilder.Query
-
-
notIn(positiveQuery, negativeQuery) → {queryBuilder.Query}
-
Builds a query where the matching content qualifies for the positive query and does not qualify for the negative query. Positions must be enabled for indexes.
Parameters:
Name Type Description positiveQueryqueryBuilder.Query a query that must match the content negativeQueryqueryBuilder.Query a query that must not match the same content - Since:
-
- 1.0
Returns:
a composable query- Type
- queryBuilder.Query
-
-
or(subquery) → {queryBuilder.Query}
-
Builds a query for the union intersection of subqueries.
Parameters:
Name Type Argument Description subqueryqueryBuilder.Query <repeatable>
a word, value, range, geospatial, or other query or a composer such as an and query. - Since:
-
- 1.0
Returns:
a composable query- Type
- queryBuilder.Query
-
-
ordered(isOrdered) → {queryBuilder.OrderParam}
-
Specifies ordering for an queryBuilder#and or queryBuilder#near query.
Parameters:
Name Type Description isOrderedboolean whether subqueries are ordered - Since:
-
- 1.0
Returns:
a query flag for ordering -
-
pathIndex(pathExpression, namespaces) → {queryBuilder.IndexedName}
-
Specifies a path configured as an index over JSON or XML documents on the server.
Parameters:
Name Type Description pathExpressionstring the indexed path namespacesobject bindings between the prefixes in the path and namespace URIs - Since:
-
- 1.0
Returns:
an indexed name for specifying a query -
-
period(startTimestamp, endTimestamp) → {queryBuilder.PeriodParam}
-
Specifies a timespan or timestamp for comparison with a valid or system timespan in temporal documents in a queryBuilder#periodRange temporal query.
Parameters:
Name Type Argument Description startTimestampstring | Date the starting datetime for a timespan or the datetime for a timestamp endTimestampstring | Date <optional>
the starting datetime for a timespan or the datetime for a timestamp - Since:
-
- 1.0
Returns:
the specification of a period for a queryBuilder#periodRange temporal query -
-
periodCompare(axis1, operator, axis2, temporalOptions) → {queryBuilder.Query}
-
Builds a query matching temporal documents based on the relationship between the valid period and the system period. For instance, this query can find cases where what was believed to be true (the valid time) was recorded (the system time) only afterward (the valid axis is before the system axis).
Parameters:
Name Type Argument Description axis1string the configured name of the valid or system axis operatorstring the name of an Allen interval operator or ISO SQL 2011 period operator axis2string the configured name of the valid or system axis, which must be different from axis1 temporalOptionsqueryBuilder.TemporalOptionsParam <optional>
a list of options returned by queryBuilder#temporalOptions to modify the temporal query - Since:
-
- 1.0
Returns:
a composable query- Type
- queryBuilder.Query
-
-
periodRange(axis, operator, period, temporalOptions) → {queryBuilder.Query}
-
Builds a query matching temporal documents based on the relationship between the valid or system period and the specified period. This query can find what was believed to be true (the valid time) or was recorded (the system time) during a timespan or before or after a time.
Parameters:
Name Type Argument Description axisstring the configured name of the valid or system axis operatorstring the name of an Allen interval operator or ISO SQL 2011 period operator periodqueryBuilder.PeriodParam <optional>
a timespan or timestamp returned by queryBuilder#period to compare with the valid or system time of temporal documents temporalOptionsqueryBuilder.TemporalOptionsParam <optional>
a list of options returned by queryBuilder#temporalOptions to modify the temporal query - Since:
-
- 1.0
Returns:
a composable query- Type
- queryBuilder.Query
-
-
point(coordinate) → {queryBuilder.Region}
-
Specifies a point region either by passing the return value from the queryBuilder#latlon function or by passing the latitude and longitude numbers in that order (possibly wrapped in an array).
Parameters:
Name Type Description coordinatequeryBuilder.LatLon the point location - Since:
-
- 1.0
Returns:
the region criteria for a geospatial query- Type
- queryBuilder.Region
-
-
polygon(coordinate) → {queryBuilder.Region}
-
Specifies a polygon region as a list of coordinate parameters or as a coordinate array where each coordinate is specified either by the return value from the queryBuilder#latlon function or by wrapping the latitude and longitude numbers in an array.
Parameters:
Name Type Argument Description coordinatequeryBuilder.LatLon <repeatable>
the polygon coordinates - Since:
-
- 1.0
Returns:
the region criteria for a geospatial query- Type
- queryBuilder.Region
-
-
property(name) → {queryBuilder.IndexedName}
-
Specifies a JSON property for a query. As a shortcut, a JSON property can also be specified with a string instead of calling this function.
Parameters:
Name Type Description namestring the name of the property - Since:
-
- 1.0
Returns:
an indexed name for specifying a query -
-
qname(parts) → {queryBuilder.QName}
-
Specifies an XML qualified name.
Parameters:
Name Type Description partsstring | Array.<string> the namespace URI and name for the QName supplied either as two strings or as an array with two strings. - Since:
-
- 1.0
Returns:
a QName for identifying an element or attribute- Type
- queryBuilder.QName
-
-
range(indexedName, datatype, comparison, binding, defaultBinding, weight, fragmentScope, options) → {queryBuilder.Query}
-
Builds a query over a range index. You must supply either a comparison operator with one or more values or a binding to parse the comparison and value from a query string but not both. You can provide both named and default bindings for the same query.
Parameters:
Name Type Argument Description indexedNamestring | queryBuilder.IndexedName the JSON property, XML element or attribute, field, or path providing the values to the range index datatypequeryBuilder.DatatypeParam <optional>
a datatype returned by the queryBuilder#datatype to identify the index comparisonstring <optional>
an operator from the enumeration =|!=|<|<=|>|>= defaulting to the = (equivalence) operator ...value<optional>
one or more values for comparison with the indexed values bindingqueryBuilder.BindingParam <optional>
a binding (returned by the queryBuilder#bind function) for parsing the comparison operator and value from tagged values in a query string defaultBindingqueryBuilder.DefaultBindingParam <optional>
a binding (returned by the queryBuilder#bindDefault function) for parsing the comparison operator and value from untagged values in a query string weightqueryBuilder.WeightParam <optional>
a weight returned by queryBuilder#weight to increase or decrease the score of the query relative to other queries in the complete search fragmentScopequeryBuilder.FragmentScopeParam <optional>
whether the query applies to document content (the default) or document metadata properties as returned by the queryBuilder#fragmentScope function optionsqueryBuilder.RangeOptionsParam <optional>
options from queryBuilder#rangeOptions modifying the default behavior - Since:
-
- 1.0
Returns:
a composable query- Type
- queryBuilder.Query
-
-
rangeOptions(options) → {queryBuilder.RangeOptionsParam}
-
Provides options modifying the default behavior of a queryBuilder#range query.
Parameters:
Name Type Argument Description optionsstring <repeatable>
options supported for range queries - Since:
-
- 1.0
Returns:
options for a queryBuilder#range query -
-
scope(propertyOrElement, query, fragmentScope) → {queryBuilder.Query}
-
Builds a query naming a JSON property or XML element that must contain the matches for a subquery (which may be a composer query such as those returned by the queryBuilder#and and queryBuilder#or).
Parameters:
Name Type Argument Description propertyOrElementstring | queryBuilder.IndexedName the JSON property or XML element that contains the query matches; a string is treated as a JSON property queryqueryBuilder.Query | queryBuilder.BindingParam either the query that must match within the scope of the JSON property or XML element or a binding (returned by the queryBuilder#bind function) for parsing the subquery from a query string fragmentScopequeryBuilder.FragmentScopeParam <optional>
whether the query applies to document content (the default) or document metadata properties as returned by the queryBuilder#fragmentScope function - Since:
-
- 1.0
Returns:
a composable query- Type
- queryBuilder.Query
-
-
southWestNorthEast(south, west, north, east) → {object}
-
Specifies the coordinates of a box as a list of parameters for passing to the queryBuilder#box function or to the queryBuilder#heatmap function
Parameters:
Name Type Description southqueryBuilder.LatLon the south coordinate westqueryBuilder.LatLon the west coordinate northqueryBuilder.LatLon the north coordinate eastqueryBuilder.LatLon the east coordinate - Since:
-
- 1.0
Returns:
the coordinates for the box- Type
- object
-
-
temporalOptions(options) → {queryBuilder.TemporalOptionsParam}
-
Provides options modifying the default behavior of an queryBuilder#lsqtQuery, queryBuilder#periodCompare, or queryBuilder#periodRange query.
Parameters:
Name Type Argument Description optionsstring <repeatable>
options supported for temporal queries - Since:
-
- 1.0
Returns:
options for the temporal query -
-
term(weight, options) → {queryBuilder.Query}
-
Builds a query for matching words in a JSON, text, or XML document.
Parameters:
Name Type Argument Description ...textstring <optional>
one or more words to match weightqueryBuilder.WeightParam <optional>
a weight returned by queryBuilder#weight to increase or decrease the score of the query relative to other queries in the complete search optionsqueryBuilder.TermOptionsParam <optional>
options from queryBuilder#termOptions modifying the default behavior - Since:
-
- 1.0
Returns:
a composable query- Type
- queryBuilder.Query
-
-
termOptions(options) → {queryBuilder.TermOptionsParam}
-
Provides options modifying the default behavior of a queryBuilder#value or queryBuilder#word query.
Parameters:
Name Type Argument Description optionsstring <repeatable>
options supported for value or word queries - Since:
-
- 1.0
Returns:
options for a value or word query -
-
transform(name, params) → {object}
-
Specifies a transform for the documents or summary returned by a query or the tuples list returned by a values query. The transform must have been installed previously by the config.transforms#write function
Parameters:
Name Type Argument Description namestring the name of the transform paramsobject <optional>
the parameters of the transform as key-value pairs - Since:
-
- 1.0
Returns:
a transform definition for the queryBuilder#slice function- Type
- object
-
-
trueQuery() → {queryBuilder.Query}
-
Builds a query that matches all documents.
- Since:
-
- 2.0.1
Returns:
a composable query- Type
- queryBuilder.Query
-
-
udf(pluginName, functionName) → {object}
-
Identifies a UDF (User Defined Function) that calculates a custom aggregate different from a range index. The plugin implementing the aggregate must have been installed in the database server distribution on all hosts where the database has forests.
Parameters:
Name Type Description pluginNamestring the name of the plugin library that implements the UDF functionNamestring the name of the function that is the entry point within the library - Since:
-
- 1.0
Returns:
the definition of the UDF for passing to the valuesBuilder#aggregates function- Type
- object
-
-
uri() → {valuesBuilder.DatatypedValuesIndex}
-
Identifies the uri index as the source for a column of values. Each tuple (aka row) projected from a document includes the uri of the document as one of the columns.
- Since:
-
- 1.0
Returns:
an identifier for the uri index -
-
value(indexedName, binding, defaultBinding, weight, fragmentScope, options) → {queryBuilder.Query}
-
Builds a query for matching the entire text value contained by a JSON property or XML element. You must supply either one or more text values or a binding to parse the text value from a query string but not both. You can provide both named and default bindings for the same query.
Parameters:
Name Type Argument Description indexedNamestring | queryBuilder.IndexedName the JSON property, XML element, field, or path containing the value ...textstring <optional>
one or more values to match bindingqueryBuilder.BindingParam <optional>
a binding (returned by the queryBuilder#bind function) for parsing the text value from tagged values in a query string defaultBindingqueryBuilder.DefaultBindingParam <optional>
a binding (returned by the queryBuilder#bindDefault function) for parsing the text value from untagged values in a query string weightqueryBuilder.WeightParam <optional>
a weight returned by queryBuilder#weight to increase or decrease the score of the query relative to other queries in the complete search fragmentScopequeryBuilder.FragmentScopeParam <optional>
whether the query applies to document content (the default) or document metadata properties as returned by the queryBuilder#fragmentScope function optionsqueryBuilder.TermOptionsParam <optional>
options from queryBuilder#termOptions modifying the default behavior - Since:
-
- 1.0
Returns:
a composable query- Type
- queryBuilder.Query
-
-
weight(modifier) → {queryBuilder.WeightParam}
-
Increases or decreases the contribution of the query relative to other queries in the result documents ranking.
Parameters:
Name Type Description modifiernumber a number between -16 and 64 modifying the contribution of the query to the score - Since:
-
- 1.0
Returns:
a query specification for weight -
-
word(indexedName, binding, defaultBinding, weight, fragmentScope, options) → {queryBuilder.Query}
-
Builds a query for matching the word contained by a JSON property or XML element. You must supply either one or more words or a binding to parse the words from a query string but not both. You can provide both named and default bindings for the same query.
Parameters:
Name Type Argument Description indexedNamestring | queryBuilder.IndexedName the JSON property, XML element, field, or path containing the word ...textstring <optional>
one or more words to match bindingqueryBuilder.BindingParam <optional>
a binding (returned by the queryBuilder#bind function) for parsing the word from tagged word s in a query string defaultBindingqueryBuilder.DefaultBindingParam <optional>
a binding (returned by the queryBuilder#bindDefault function) for parsing the word from untagged words in a query string weightqueryBuilder.WeightParam <optional>
a weight returned by queryBuilder#weight to increase or decrease the score of the query relative to other queries in the complete search fragmentScopequeryBuilder.FragmentScopeParam <optional>
whether the query applies to document content (the default) or document metadata properties as returned by the queryBuilder#fragmentScope function optionsqueryBuilder.TermOptionsParam <optional>
options from queryBuilder#termOptions modifying the default behavior - Since:
-
- 1.0
Returns:
a composable query- Type
- queryBuilder.Query
Type Definitions
-
-
DatatypedValuesIndex
-
A source of datatyped values from a JSON property, XML element or attribute, field, or path range or geospatial index or from the collection or uri index.
Type:
- object
- Since:
-
- 1.0