Namespace: queryBuilder

queryBuilder

A helper for building the definition of a document query. The helper is created by the marklogic.queryBuilder function.

Namespaces

BuiltQuery

Methods


after() → {queryBuilder.Query}

Builds a query to return fragments committed after a specified time.
Parameters:
Type Description
[String | Number | Date] - referring to the time to find fragments committed after this
Returns:
a composable query
Type
queryBuilder.Query

anchor(milestone, lower, comparison, upper) → {queryBuilder.AnchorParam}

Defines a numeric or datetime range of for aggregating value frequencies as part of a queryBuilder#facet calculation. To compute both lower and upper bounds relative to the same anchor, you can as a convenience return both bounds and the comparison from a single call to an queryBuilder#anchor function.
Parameters:
Name Type Argument Description
milestone string the temporal milestone from the enumeration now|start-of-day|start-of-month|start-of-year
lower string a boundary as a duration offset relative to the temporal milestone such as -P1Y for one year in the past, -P2D for two days in the past, and so on; formally, an xs:duration, xs:yearMonthDuration, or xs:dayTimeDuration value
comparison string <optional>
the constant '<' separating the lower and upper bounds; if the comparison is provided, the preceding offset must establish the lower bound and the following offset must establish the upper bound
upper string <optional>
the upper boundary as a duration offset relative to the temporal milestone
Since:
  • 1.0
Returns:
specification for a queryBuilder#bucket as part of a facet calculation
Type
queryBuilder.AnchorParam

and(subquery, ordering) → {queryBuilder.Query}

Builds a query for the intersection of the subqueries.
Parameters:
Name Type Argument Description
subquery queryBuilder.Query <repeatable>
a word, value, range, geospatial, or other query or a composer such as an or query.
ordering queryBuilder.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
positiveQuery queryBuilder.Query a query that must match the result documents
negativeQuery queryBuilder.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
element string | Array.<string> | queryBuilder.QName the name of the element
attribute string | Array.<string> | queryBuilder.QName the name of the attribute
Since:
  • 1.0
Returns:
an indexed name for specifying a query
Type
queryBuilder.IndexedName

before() → {queryBuilder.Query}

Builds a query to return fragments committed before a specified time.
Parameters:
Type Description
[String | Number | Date] - referring to the time to find fragments committed before this
Returns:
a composable query
Type
queryBuilder.Query

bind(parts) → {queryBuilder.BindingParam}

Specifies a constraint name that binds values provided by a parsed query string to a query. The values are tagged with the constraint name in the query string. The binding occupies the position of the values in the query specification.
Parameters:
Name Type Description
parts string the constraint name
Since:
  • 1.0
Returns:
the binding for the constraint name
Type
queryBuilder.BindingParam

bindDefault() → {queryBuilder.DefaultBindingParam}

Binds untagged values provided by a parsed query string to a query. The binding occupies the position of the values in the query specification. A search can have only one default binding.
Since:
  • 1.0
Returns:
the binding for the constraint name
Type
queryBuilder.DefaultBindingParam

bindEmptyAs(apply) → {queryBuilder.EmptyBindingParam}

Binds an empty query string to no documents or all documents.
Parameters:
Name Type Description
apply string a function from the all-results|no-results enumeration to control whether empty criteria matches all or no results
Since:
  • 1.0
Returns:
the binding for an empty string to pass to the queryBuilder#parseBindings function
Type
queryBuilder.EmptyBindingParam

boost(matchingQuery, boostingQuery) → {queryBuilder.Query}

Builds a query with matching and boosting subqueries.
Parameters:
Name Type Description
matchingQuery queryBuilder.Query a query that must match the result documents
boostingQuery queryBuilder.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
south queryBuilder.LatLon the south coordinate of the box
west queryBuilder.LatLon the west coordinate for the box
north queryBuilder.LatLon the north coordinate for the box
east queryBuilder.LatLon the east coordinate for the box
Since:
  • 1.0
Returns:
the region criteria for a geospatial query
Type
queryBuilder.Region

bucket(name, lower, comparison, upper) → {queryBuilder.BucketParam}

Defines a numeric or datetime range of for aggregating value frequencies as part of a queryBuilder#facet calculation. To compute both lower and upper bounds relative to the same anchor, you can as a convenience return both bounds and the relation from a single call to an queryBuilder#anchor function.
Parameters:
Name Type Argument Description
name string the name of the bucket
lower <optional>
the lower numeric or datetime boundary, which is less than or equal to the values in the bucket; omit the lower bound to specify a bucket for the smallest values; return the lower bound from an queryBuilder#anchor function to compute a datetime boundary relative to a temporal milestone
comparison string the constant '<' separating and comparing the lower and upper bounds
upper <optional>
the upper numeric or datetime boundary, which is greater than the values in the bucket; omit the upper bound to specify a bucket for the largest values; return the upper bound from an queryBuilder#anchor function to compute a datetime boundary relative to a temporal milestone
Since:
  • 1.0
Returns:
specification for a queryBuilder#facet calculation
Type
queryBuilder.BucketParam

byExample() → {queryBuilder.QueryByExample}

Builds a query by example from one or more objects that annotate instances of properties to match. To match JSON documents, pass in a JavaScript object with the property values known to exists in the documents. To match XML documents, pass in a QBE expressed as an XML string. For unnamespaced XML documents, you can also pass a JavaScript object with a $query property that has the query and a $format property of 'xml'.
Parameters:
Name Type Description
...query object one or more objects with example properties
Since:
  • 1.0
Returns:
a query for the queryBuilder#where function
Type
queryBuilder.QueryByExample

calculate() → {queryBuilder.BuiltQuery}

Sets the calculate clause of a built query, specifying JSON properties, XML elements or attributes, fields, or paths with a range index for value frequency or other aggregate calculation.
Parameters:
Name Type Description
...facets queryBuilder.Facet the facets to calculate over the documents in the result set as returned by the queryBuilder#facet function.
Since:
  • 1.0
Returns:
a built query
Type
queryBuilder.BuiltQuery

calculateFunction(moduleName) → {queryBuilder.CalculateFunction}

Specifies a module that generates a custom facet as an argument to the queryBuilder#facet function. The library must be installed as /ext/marklogic/query/custom/MODULE_NAME.xqy, must have the http://marklogic.com/query/custom/MODULE_NAME namespace, and must define the start-facet() and finish-facet() functions. The same module can implement a parse() function for a custom parser specified with the queryBuilder#parseFunction helper.
Parameters:
Name Type Description
moduleName string the name of the module with the functions
Since:
  • 1.0
Returns:
the specification for a custom facet module for the queryBuilder#facet function.
Type
queryBuilder.CalculateFunction

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
radius number the radius for the circle
center queryBuilder.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
collections string | 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
prefix string <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

coordSystem(coord) → {queryBuilder.CoordSystem}

Identifies the coordinate system used by a geospatial path index.
Parameters:
Name Type Description
coord string the name of the coordinate system
Since:
  • 1.0
Returns:
a coordinate system identifier
Type
queryBuilder.CoordSystem

copyFromQueryBuilder(query) → {queryBuilder.BuiltQuery}

Initializes a new query builder by copying any where, calculate, orderBy, slice, or withOptions clause defined in the built query.
Parameters:
Name Type Description
query queryBuilder.BuiltQuery an existing query with clauses to copy
Since:
  • 1.0
Returns:
a built query
Type
queryBuilder.BuiltQuery

datatype(datatype, collation) → {queryBuilder.DatatypeParam}

Identifies the datatype of an index.
Parameters:
Name Type Argument Description
datatype string a value from the enumeration int|unsignedInt|long|unsignedLong|float|double|decimal|dateTime|time|date|gYearMonth|gYear|gMonth|gDay|yearMonthDuration|dayTimeDuration|string|anyURI|point
collation string <optional>
a URI identifying the comparison method for a string or anyURI datatype
Since:
  • 1.0
Returns:
a datatype specification
Type
queryBuilder.DatatypeParam

directory(uris, infinite) → {queryBuilder.Query}

Builds a query matching documents in one or more database directories.
Parameters:
Name Type Argument Description
uris string | Array.<string> one or more directory uris to match
infinite boolean <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
uris string | 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
query queryBuilder.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
name string | Array.<string> | queryBuilder.QName the name of the element
Since:
  • 1.0
Returns:
an indexed name for specifying a query
Type
queryBuilder.IndexedName

extract(paths, namespaces, selected) → {object}

Specifies JSON properties or XML elements to project from the documents returned by a query.
Parameters:
Name Type Argument Description
paths string | Array.<string> restricted XPaths (valid for the cts:valid-index-path() function) to match in documents
namespaces object <optional>
for XPaths using namespaces, an object whose properties specify the prefix as the key and the uri as the value
selected string <optional>
specifies how to process the selected JSON properties or XML elements where include (the default) lists the selections, include-ancestors projects a sparse document with the selections and their ancesors, and exclude suppresses the selections to projects a sparse document with the sibilings and ancestors of the selections.
Since:
  • 1.0
Returns:
a extract definition for the queryBuilder#slice function
Type
object

facet(name, indexedName, buckets, custom, options) → {queryBuilder.Facet}

Calculates frequency of the values in a collection, range index, or geospatial index for the qualified documents. You can enumerate the indexed values, group numeric or datetime values in buckets, or group geospatial values in a heatmap grid. The name of the facet can also be used as a constraint to tag values in a parsed string query (if supplied in the queryBuilder#where clause) and bind the values to a query.
Parameters:
Name Type Argument Description
name string a name for the facet to identify the calculated result and use as a constraint to tag values in a parsed query string
indexedName queryBuilder.IndexedName | queryBuilder.GeoLocation a JSON property, XML element or attribute, field, or path with a range index or the specification of a geospatial index.
...bucket queryBuilder.BucketParam <optional>
for a numeric or datetime facet, two or more ranges returned by the queryBuilder#bucket function
buckets queryBuilder.HeatMapParam <optional>
for a geospatial facet, a grid of geospatial locations returned by the queryBuilder#heatmap function
custom queryBuilder.CalculateFunction <optional>
for a custom facet, the specification of a module returned by the queryBuilder#calculateFunction function
options queryBuilder.FacetOptionsParam <optional>
options from queryBuilder#facetOptions modifying the default behavior
Since:
  • 1.0
Returns:
a facet definition for the queryBuilder#calculate function
Type
queryBuilder.Facet

facetOptions(options) → {queryBuilder.FacetOptionsParam}

Provides options modifying the default behavior of a queryBuilder#facet calculation.
Parameters:
Name Type Argument Description
options string <repeatable>
options supported for facet calculations
Since:
  • 1.0
Returns:
options for a queryBuilder#facet calculation
Type
queryBuilder.FacetOptionsParam

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
name string the name of the field
collation string <optional>
the collation of a field over strings
Since:
  • 1.0
Returns:
an indexed name for specifying a query
Type
queryBuilder.IndexedName

fragmentScope(scopeType) → {queryBuilder.FragmentScopeParam}

Configures a query to match documents based on document content or document metadata properties.
Parameters:
Name Type Description
scopeType string 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
Type
queryBuilder.FragmentScopeParam

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
parent string | queryBuilder.QName the name of the element containing the attributes as returned by the queryBuilder#qname function
latitude string | queryBuilder.QName the name of the latitude attribute as returned by the queryBuilder#qname function
longitude string | 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
Type
queryBuilder.GeoLocation

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
parent string | queryBuilder.QName <optional>
the optional name of the parent of the geospatial element as returned by the queryBuilder#qname function
element string | queryBuilder.QName the name of the element as returned by the queryBuilder#qname function
Since:
  • 1.0
Returns:
the specification for the geospatial locations
Type
queryBuilder.GeoLocation

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
parent string | queryBuilder.QName the name of the containing parent element as returned by the queryBuilder#qname function
latitude string | queryBuilder.QName the name of the latitude element as returned by the queryBuilder#qname function
longitude string | 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
Type
queryBuilder.GeoLocation

geoOptions(options) → {queryBuilder.GeoOptionsParam}

Provides options modifying the default behavior of a queryBuilder#geospatial query.
Parameters:
Name Type Argument Description
options string <repeatable>
options supported for geospatial queries
Since:
  • 1.0
Returns:
options for the geospatial query
Type
queryBuilder.GeoOptionsParam

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
path string | object the XPath for the path index as a string or as the return value of the queryBuilder#pathIndex function
namespaces object bindings between the prefixes in the path and namespace URIs
coordSystem queryBuilder.CoordSystem the coordinate system for the index
Since:
  • 1.0
Returns:
the specification for the geospatial locations
Type
queryBuilder.GeoLocation

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
parent string <optional>
the optional name of the parent of the geospatial property
element string the name of the geospatial property
Since:
  • 1.0
Returns:
the specification for the geospatial locations
Type
queryBuilder.GeoLocation

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
parent string the name of the containing parent property
latitude string the name of the latitude property
longitude string the name of the longitude property
Since:
  • 1.0
Returns:
the specification for the geospatial locations
Type
queryBuilder.GeoLocation

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
location queryBuilder.GeoLocation the JSON property or XML element representing the geospatial locations
weight queryBuilder.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
fragmentScope queryBuilder.FragmentScopeParam <optional>
whether the query applies to document content (the default) or document metadata properties as returned by the queryBuilder#fragmentScope function
geoOptions queryBuilder.GeoOptionsParam <optional>
a list of options returned by queryBuilder#geoOptions to modify the geospatial query
criteria queryBuilder.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

geospatialRegion(location, operator, weight, fragmentScope, geoOptions, criteria) → {queryBuilder.Query}

Builds a geospatial query or facet against a geospatial region 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
location queryBuilder.GeoLocation the JSON property or XML element representing the geospatial locations
operator string a spatial operator: disjoint|contains|covers|intersects|within|covered-by|overlaps
weight queryBuilder.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
fragmentScope queryBuilder.FragmentScopeParam <optional>
whether the query applies to document content (the default) or document metadata properties as returned by the queryBuilder#fragmentScope function
geoOptions queryBuilder.GeoOptionsParam <optional>
a list of options returned by queryBuilder#geoOptions to modify the geospatial query
criteria queryBuilder.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:
  • 2.0.1
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
latdivs number the number of latitude divisions in the grid
londivs number the number of longitude divisions in the grid
south queryBuilder.LatLon the south coordinate of the box
west queryBuilder.LatLon the west coordinate for the box
north queryBuilder.LatLon the north coordinate for the box
east queryBuilder.LatLon the east coordinate for the box
Since:
  • 1.0
Returns:
the buckets for a geospatial facet
Type
queryBuilder.HeatMapParam

jsontype(jsontype) → {queryBuilder.JSONTypeParam}

Identifies whether a JSON property has boolean, null, numeric, or string values in the database.
Parameters:
Name Type Description
jsontype string a value from the enumeration boolean|null|number|string
Since:
  • 1.0
Returns:
a JSON value type specification
Type
queryBuilder.JSONTypeParam

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
latitude number the north-south location
longitude number 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
query queryBuilder.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
temporalCollection string the name of the temporal collection that retains the temporal documents
weight queryBuilder.WeightParam <optional>
a weight returned by queryBuilder#weight to increase or decrease the score of subqueries relative to other queries in the complete search
timestamp string | Date <optional>
a datetime older than the LSQT to use as the upper boundary for an older view of the database
temporalOptions queryBuilder.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

minDistance(distance) → {queryBuilder.MinDistanceParam}

Specifies a minimum distance between matching subqueries to consider for the queryBuilder#minDistance function.
Parameters:
Name Type Description
distance number the minimum number of words between any two matching subqueries
Since:
  • 2.0.1
Returns:
a query specification for minimum distance
Type
queryBuilder.MinDistanceParam

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
subquery queryBuilder.Query <repeatable>
a word, value, range, geospatial, or other query or a composer such as an or query.
distance number <optional>
the maximum number of words between any two matching subqueries
weight queryBuilder.WeightParam <optional>
a weight returned by queryBuilder#weight to increase or decrease the score of subqueries relative to other queries in the complete search
ordering queryBuilder.OrderParam <optional>
the ordering on the subqueries returned from queryBuilder#ordered
minDistance queryBuilder.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
subquery queryBuilder.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
positiveQuery queryBuilder.Query a query that must match the content
negativeQuery queryBuilder.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
subquery queryBuilder.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

orderBy() → {queryBuilder.BuiltQuery}

Sets the orderBy clause of a built query, using the helper functions of a queryBuilder to specify the sequence and direction of sorting. This function may be called on the result of building a query.
Parameters:
Name Type Description
...sortItem queryBuilder.IndexedName | queryBuilder.Score | queryBuilder.Sort a JSON property, XML element or attribute, field, or path with a range index or the relevance ranking of the document returned by the queryBuilder#score function, where either may be returned from the queryBuilder#sort function to indicate the sort direction.
Since:
  • 1.0
Returns:
a built query
Type
queryBuilder.BuiltQuery

ordered(isOrdered) → {queryBuilder.OrderParam}

Specifies ordering for an queryBuilder#and or queryBuilder#near query.
Parameters:
Name Type Description
isOrdered boolean whether subqueries are ordered
Since:
  • 1.0
Returns:
a query flag for ordering
Type
queryBuilder.OrderParam

parseBindings(emptyBinding) → {queryBuilder.ParseBindings}

Maps constraint names to queries and passed to a queryBuilder#parsedFrom function for tagging values within the query string. The query parsing occurs on the server.
Parameters:
Name Type Argument Description
...query queryBuilder.Query | queryBuilder.ParseFunction queries that contain a binding to a constraint name as returned by the queryBuilder#bind (instead of specifying the criteria directly in the query) or that supply a custom constraint parsing function to generate the query as returned by the queryBuilder#parseFunction
emptyBinding queryBuilder.EmptyBindingParam <optional>
specifies whether an empty string matches no documents or all documents as returned by the queryBuilder#bindEmptyAs function
Since:
  • 1.0
Returns:
a list of constraint bindings for the queryBuilder#parsedFrom function
Type
queryBuilder.ParseBindings

parseFunction(moduleName, options) → {queryBuilder.ParseFunction}

Specifies a custom constraint module that parses a tagged value as an argument to the queryBuilder#parseBindings function. The library must be installed as /ext/marklogic/query/custom/MODULE_NAME.xqy, must have the http://marklogic.com/query/custom/MODULE_NAME namespace, and must define the parse() function. The same module can implement start-facet() and finish-facet() functions for a custom facet specified with the queryBuilder#calculateFunction helper.
Parameters:
Name Type Argument Description
moduleName string the name of the module with the function
options queryBuilder.TermOptionsParam <optional>
options from queryBuilder#termOptions modifying the default behavior
Since:
  • 1.0
Returns:
the specification for a custom parsing module for the queryBuilder#parseBindings function.
Type
queryBuilder.ParseFunction

parsedFrom(query, bindings) → {queryBuilder.ParsedQuery}

Builds a parsed query from a string and bindings of constraint tags to queries. The query parsing occurs on the server.
Parameters:
Name Type Description
query string the string to parse
bindings queryBuilder.ParseBindings the mappings of constraint names to queries as returned by the queryBuilder#parseBindings function
Since:
  • 1.0
Returns:
a query for the queryBuilder#where function
Type
queryBuilder.ParsedQuery

pathIndex(pathExpression, namespaces) → {queryBuilder.IndexedName}

Specifies a path configured as an index over JSON or XML documents on the server.
Parameters:
Name Type Description
pathExpression string the indexed path
namespaces object bindings between the prefixes in the path and namespace URIs
Since:
  • 1.0
Returns:
an indexed name for specifying a query
Type
queryBuilder.IndexedName

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
startTimestamp string | Date the starting datetime for a timespan or the datetime for a timestamp
endTimestamp string | 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
Type
queryBuilder.PeriodParam

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
axis1 string the configured name of the valid or system axis
operator string the name of an Allen interval operator or ISO SQL 2011 period operator
axis2 string the configured name of the valid or system axis, which must be different from axis1
temporalOptions queryBuilder.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
axis string the configured name of the valid or system axis
operator string the name of an Allen interval operator or ISO SQL 2011 period operator
period queryBuilder.PeriodParam <optional>
a timespan or timestamp returned by queryBuilder#period to compare with the valid or system time of temporal documents
temporalOptions queryBuilder.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
coordinate queryBuilder.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
coordinate queryBuilder.LatLon <repeatable>
the polygon coordinates
Since:
  • 1.0
Returns:
the region criteria for a geospatial query
Type
queryBuilder.Region

propertiesFragment(query) → {queryBuilder.Query}

Builds a query that applies the subquery to document metadata by contrast with the queryBuilder#documentFragment function.
Parameters:
Name Type Description
query queryBuilder.Query the query that must match document metadata properties
Since:
  • 1.0
Returns:
a composable query
Type
queryBuilder.Query

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
name string the name of the property
Since:
  • 1.0
Returns:
an indexed name for specifying a query
Type
queryBuilder.IndexedName

qname(parts) → {queryBuilder.QName}

Specifies an XML qualified name.
Parameters:
Name Type Description
parts string | 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
indexedName string | queryBuilder.IndexedName the JSON property, XML element or attribute, field, or path providing the values to the range index
datatype queryBuilder.DatatypeParam <optional>
a datatype returned by the queryBuilder#datatype to identify the index
comparison string <optional>
an operator from the enumeration =|!=|<|<=|>|>= defaulting to the = (equivalence) operator
...value <optional>
one or more values for comparison with the indexed values
binding queryBuilder.BindingParam <optional>
a binding (returned by the queryBuilder#bind function) for parsing the comparison operator and value from tagged values in a query string
defaultBinding queryBuilder.DefaultBindingParam <optional>
a binding (returned by the queryBuilder#bindDefault function) for parsing the comparison operator and value from untagged values in a query string
weight queryBuilder.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
fragmentScope queryBuilder.FragmentScopeParam <optional>
whether the query applies to document content (the default) or document metadata properties as returned by the queryBuilder#fragmentScope function
options queryBuilder.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
options string <repeatable>
options supported for range queries
Since:
  • 1.0
Returns:
options for a queryBuilder#range query
Type
queryBuilder.RangeOptionsParam

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
propertyOrElement string | queryBuilder.IndexedName the JSON property or XML element that contains the query matches; a string is treated as a JSON property
query queryBuilder.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
fragmentScope queryBuilder.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

score(method) → {queryBuilder.Score}

Specifies the relevance ranking for ordering documents in the query results, optionally specifying the score method.
Parameters:
Name Type Argument Description
method string <optional>
a scoring strategy from the enumeration logtfidf|logtf|simple|random|zero, defaulting to logtfidf.
Since:
  • 1.0
Returns:
a sort definition for the queryBuilder#orderBy function
Type
queryBuilder.Score

slice(start, length, transform) → {queryBuilder.BuiltQuery}

Sets the slice clause of a built query to select a slice of documents from the result set based on the start document within the result set and the number of documents in the slice. (A slice is also sometimes called a page of search results.) By default, the slice uses array slice mode, but you can switch to legacy slice mode with marklogic.setSliceMode. Legacy slice mode is deprecated and will be removed in the next major release.
Parameters:
Name Type Argument Description
start number in array slice mode, the zero-based position within the result set of the first document; in legacy slice mode, the one-based position within the result set of the first document or 0 to suppress the documents and return only the summary
length number <optional>
in array slice mode, the zero-based position of the document after the last document in the slice or 0 to suppress the documents and return only the summary; in legacy slice mode, the number of documents in the slice
transform transform <optional>
a transform to apply to each document in the slice on the server as specified by the queryBuilder#transform function.
Since:
  • 1.0
Returns:
a built query
Type
queryBuilder.BuiltQuery

snippet(name, options) → {object}

Specifies a function for getting snippets with highlighted matching text and contextual preceding and following text from the documents returned by a query. You can specify a built-in snippeting function or custom snippeting library. The custom snippeting library must have been installed previously by the config.query.snippet#write function
Parameters:
Name Type Argument Description
name string either the name of a builtin snippeting function from the empty|metadata|snippet enumeration (where snippet is the default) or the filename without path for a custom snippeting library
options object <optional>
the configuration options for a built-in snippeting function including 'per-match-tokens', 'max-matches', 'max-snippet-chars', and 'preferred-matches'; you cannot specify options or parameters for a custom snippeting library
Since:
  • 1.0
Returns:
a snippet definition for the queryBuilder#slice function
Type
object

sort(sortItem, direction) → {queryBuilder.Sort}

Specifies the direction for sorting documents for a range index or relevance score.
Parameters:
Name Type Description
sortItem queryBuilder.IndexedName | queryBuilder.Score a JSON property, XML element or attribute, field, or path with a range index or the relevance ranking of the document returned by the queryBuilder#score function.
direction string a specification from the ascending|descending enumeration.
Since:
  • 1.0
Returns:
a sort definition for the queryBuilder#orderBy function
Type
queryBuilder.Sort

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
south queryBuilder.LatLon the south coordinate
west queryBuilder.LatLon the west coordinate
north queryBuilder.LatLon the north coordinate
east queryBuilder.LatLon the east coordinate
Since:
  • 1.0
Returns:
the coordinates for the box
Type
object

suggestBindings() → {queryBuilder.SuggestBindings}

Maps constraint names to indexes for passing to the documents#suggest function to retreive suggestions for completing criteria for the constraints.
Parameters:
Name Type Description
...query queryBuilder.Query queries that contain a binding to a constraint name as returned by the queryBuilder#bind
Since:
  • 1.0
Returns:
a list of constraint bindings for the documents#suggest function
Type
queryBuilder.SuggestBindings

suggestOptions(options) → {queryBuilder.SuggestOptionsParam}

Provides options modifying the default behavior of an documents#suggest query.
Parameters:
Name Type Argument Description
options string <repeatable>
one or more options supported by documents#suggest for the type of index
Since:
  • 1.0
Returns:
options for the suggest query
Type
queryBuilder.SuggestOptionsParam

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
options string <repeatable>
options supported for temporal queries
Since:
  • 1.0
Returns:
options for the temporal query
Type
queryBuilder.TemporalOptionsParam

term(weight, options) → {queryBuilder.Query}

Builds a query for matching words in a JSON, text, or XML document.
Parameters:
Name Type Argument Description
...text string <optional>
one or more words to match
weight queryBuilder.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
options queryBuilder.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
options string <repeatable>
options supported for value or word queries
Since:
  • 1.0
Returns:
options for a value or word query
Type
queryBuilder.TermOptionsParam

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
name string the name of the transform
params object <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

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
indexedName string | queryBuilder.IndexedName the JSON property, XML element, field, or path containing the value
...text string <optional>
one or more values to match
binding queryBuilder.BindingParam <optional>
a binding (returned by the queryBuilder#bind function) for parsing the text value from tagged values in a query string
defaultBinding queryBuilder.DefaultBindingParam <optional>
a binding (returned by the queryBuilder#bindDefault function) for parsing the text value from untagged values in a query string
weight queryBuilder.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
fragmentScope queryBuilder.FragmentScopeParam <optional>
whether the query applies to document content (the default) or document metadata properties as returned by the queryBuilder#fragmentScope function
options queryBuilder.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
modifier number a number between -16 and 64 modifying the contribution of the query to the score
Since:
  • 1.0
Returns:
a query specification for weight
Type
queryBuilder.WeightParam

where(query) → {queryBuilder.BuiltQuery}

Sets the where clause of a built query, using the helper functions of a queryBuilder to specify either a single query by example, a structured query, a string query, or both structured and string queries. When you include a string and structured query, they are AND'd together. You can use an empty where clause to qualify all documents in the database (though for large databases, you would not want to retrieve all documents in a single request). This function may be called on a query builder or on the result of building a query.
Parameters:
Name Type Argument Description
query queryBuilder.Query | queryBuilder.ParsedQuery | queryBuilder.QueryByExample <optional>
one or more composable queries returned by query builder functions; or a parsed query returned by the queryBuilder#parsedFrom function; or or a parsed query plus one or more composable queries, which are implicitly AND'd together; or a query by example returned by the queryBuilder#byExample function.
Since:
  • 1.0
Returns:
a built query
Type
queryBuilder.BuiltQuery

withOptions(categories, concurrencyLevel, forestNames, search, txid, weight, debug, metrics, queryPlan, similarDocs) → {queryBuilder.BuiltQuery}

Sets the withOptions clause of a built query to configure the query; takes a configuration object with the following named parameters. This function may be called on the result of building a query. When the 'debug', 'metrics', 'queryPlan', or 'similarDocs' parameter is set, a search summary object will be returned along with the result documents. When 'categories' is set to 'none', only a search summary is returned.
Parameters:
Name Type Argument Description
categories documents.categories <optional>
the categories of information to retrieve for the result documents
concurrencyLevel number <optional>
the maximum number of threads to use to calculate facets
forestNames string | Array.<string> <optional>
the ids of forests providing documents for the result set
search string <optional>
<repeatable>
options modifying the default behaviour of the query
txid string | transactions.Transaction <optional>
a string transaction id or Transaction object identifying an open multi-statement transaction
weight number <optional>
a weighting factor between -16 and 64
debug boolean <optional>
whether to return query debugging
metrics boolean <optional>
whether to return metrics for the query performance
queryPlan boolean <optional>
whether to return a plan for the execution of the query
similarDocs boolean <optional>
whether to return a list of URIs for documents similar to each result
Since:
  • 1.0
Returns:
a built query
Type
queryBuilder.BuiltQuery

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
indexedName string | queryBuilder.IndexedName the JSON property, XML element, field, or path containing the word
...text string <optional>
one or more words to match
binding queryBuilder.BindingParam <optional>
a binding (returned by the queryBuilder#bind function) for parsing the word from tagged word s in a query string
defaultBinding queryBuilder.DefaultBindingParam <optional>
a binding (returned by the queryBuilder#bindDefault function) for parsing the word from untagged words in a query string
weight queryBuilder.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
fragmentScope queryBuilder.FragmentScopeParam <optional>
whether the query applies to document content (the default) or document metadata properties as returned by the queryBuilder#fragmentScope function
options queryBuilder.TermOptionsParam <optional>
options from queryBuilder#termOptions modifying the default behavior
Since:
  • 1.0
Returns:
a composable query
Type
queryBuilder.Query

Type Definitions


AnchorParam

The specification for computing a datetime boundary or range as returned by the queryBuilder#anchor function to pass to the queryBuilder#bucket function.
Type:
  • object
Since:
  • 1.0

BindingParam

A binding returned by the queryBuilder#bind function for parsing a query string. The binding declares a constraint name that tags the values in the query string and occupies the position of the values in a query.
Type:
  • object
Since:
  • 1.0

BucketParam

The definition of a numeric or datetime range returned by the queryBuilder#bucket function for aggregating value frequencies with a queryBuilder#facet function.
Type:
  • object
Since:
  • 1.0

CalculateFunction

The specification for a custom constraint facet generation module as returned by queryBuilder#calculateFunction to pass to the queryBuilder#facet function.
Type:
  • object
Since:
  • 1.0

CoordSystem

The specification of the coordinate system returned by the queryBuilder#coordSystem function for a geospatial path index
Type:
  • object
Since:
  • 1.0

DatatypeParam

The datatype specification returned by the queryBuilder#datatype function.
Type:
  • object
Since:
  • 1.0

DefaultBindingParam

A binding returned by the queryBuilder#bindDefault function for parsing a query string. The binding associates untagged values in the query string with a query, occupying the position of the values in a query. A search can have only one default binding.
Type:
  • object
Since:
  • 1.0

EmptyBindingParam

A specification whether an empty query string should be bound to a query for no documents or all documents as returned by the queryBuilder#bindEmptyAs function.
Type:
  • object
Since:
  • 1.0

Facet

A facet definition returned by the queryBuilder#facet function to pass to a queryBuilder#calculate function.
Type:
  • object
Since:
  • 1.0

FacetOptionsParam

Options for a facet calculation returned by the queryBuilder#facetOptions function.
Type:
  • object
Since:
  • 1.0

FragmentScopeParam

A query argument specifying whether queries match documents based on document content or document metadata properties; returned by the queryBuilder#fragmentScope function.
Type:
  • object
Since:
  • 1.0

GeoLocation

An indexed name such as a JSON property, XML element, or path that represents a geospatial location for matched by a geospatial query.
Type:
  • object
Since:
  • 1.0

GeoOptionsParam

Options for a geospatial query returned by the queryBuilder#geoOptions function.
Type:
  • object
Since:
  • 1.0

HeatMapParam

Specifies the buckets for a geospatial facet.
Type:
  • object
Since:
  • 1.0

IndexedName

Type:
  • object
Since:
  • 1.0

JSONTypeParam

The specification returned by the queryBuilder#jsontype function.
Type:
  • object
Since:
  • 1.0

LatLon

The specification of the latitude and longitude returned by the queryBuilder#latlon function for a coordinate of a queryBuilder.Region.
Type:
  • object
Since:
  • 1.0

MinDistanceParam

The minimum distance value returned by the queryBuilder#minDistance function.
Type:
  • object

OrderParam

The ordering returned by the queryBuilder#ordered function.
Type:
  • object
Since:
  • 1.0

ParseBindings

Mappings of constraint names to queries as returned by the queryBuilder#parseBindings function to pass to a queryBuilder#parsedFrom function for tagging values within the query string.
Type:
  • object
Since:
  • 1.0

ParseFunction

The specification for a custom constraint parsing module as returned by queryBuilder#parseFunction to pass to the queryBuilder#parseBindings function.
Type:
  • object
Since:
  • 1.0

ParsedQuery

A query definition returned by the queryBuilder#parsedFrom function to pass to a queryBuilder#where function.
Type:
  • object
Since:
  • 1.0

PeriodParam

The specification for a timespan or timestamp for an query returned by the queryBuilder#period function.
Type:
  • object
Since:
  • 1.0

QName

A namespaced name for an element or attribute returned by the queryBuilder#qname function.
Type:
  • object
Since:
  • 1.0

Query

A composable query.
Type:
  • object
Since:
  • 1.0

QueryByExample

A query definition returned by the queryBuilder#byExample function to pass to a queryBuilder#where function.
Type:
  • object
Since:
  • 1.0

RangeOptionsParam

Options for a range query returned by the queryBuilder#rangeOptions function.
Type:
  • object
Since:
  • 1.0

Region

The specification of a point or an area (such as a box, circle, or polygon) for use as criteria in a geospatial query.
Type:
  • object
Since:
  • 1.0

Score

A sort definition returned by the queryBuilder#score function to pass to a queryBuilder#orderBy function.
Type:
  • object
Since:
  • 1.0

Sort

A sort definition returned by the queryBuilder#sort function to pass to a queryBuilder#orderBy function.
Type:
  • object
Since:
  • 1.0

SuggestBindings

Mappings of constraint names to indexes as returned by the queryBuilder#suggestBindings function to pass to a documents#suggest function to retreive suggestions for completing criteria for the constraints.
Type:
  • object
Since:
  • 1.0

SuggestOptionsParam

Options for suggestions to retrieve from a word, value, collection, range, or geospatial index as returned by the queryBuilder#suggestOptions function.
Type:
  • object
Since:
  • 1.0

TemporalOptionsParam

Options for a temporal query returned by the queryBuilder#temporalOptions function.
Type:
  • object
Since:
  • 1.0

TermOptionsParam

Options for a range query returned by the queryBuilder#termOptions function.
Type:
  • object
Since:
  • 1.0

WeightParam

The weight modification returned by the queryBuilder#weight function.
Type:
  • object
Since:
  • 1.0
Copyright (c) 2020 MarkLogic Corporation Documentation generated by JSDoc 4.0.0 on 2024-08-20T21:35:27-07:00 using the DocStrap template.