diff --git a/marklogic-client-api/src/main/java/com/marklogic/client/expression/CtsExpr.java b/marklogic-client-api/src/main/java/com/marklogic/client/expression/CtsExpr.java index a01b41fe1..1043d77be 100644 --- a/marklogic-client-api/src/main/java/com/marklogic/client/expression/CtsExpr.java +++ b/marklogic-client-api/src/main/java/com/marklogic/client/expression/CtsExpr.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2025 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved. + * Copyright (c) 2010-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved. */ package com.marklogic.client.expression; @@ -16,6 +16,7 @@ import com.marklogic.client.type.XsUnsignedLongVal; import com.marklogic.client.type.ServerExpression; +import com.marklogic.client.type.PlanParamExpr; import com.marklogic.client.type.CtsBoxExpr; import com.marklogic.client.type.CtsBoxSeqExpr; import com.marklogic.client.type.CtsCircleExpr; @@ -48,7 +49,7 @@ public interface CtsExpr { * Returns a query matching fragments committed after a specified timestamp. * * - + *
* Provides a client interface to the cts:after-query server function. * @param timestamp A commit timestamp. Database fragments committed after this timestamp are matched. (of xs:unsignedLong) @@ -59,7 +60,7 @@ public interface CtsExpr { * Returns a query specifying the set difference of the matches specified by two sub-queries. * * - + *
* Provides a client interface to the cts:and-not-query server function. * @param positiveQuery A positive query, specifying the search results filtered in. (of cts:query) @@ -79,7 +80,7 @@ public interface CtsExpr { * Returns a query specifying the intersection of the matches specified by the sub-queries. * * - + *
* Provides a client interface to the cts:and-query server function. * @param queries A sequence of sub-queries. (of cts:query) @@ -108,7 +109,7 @@ public interface CtsExpr { * Returns a query matching fragments committed before or at a specified timestamp. * * - + *
* Provides a client interface to the cts:before-query server function. * @param timestamp A commit timestamp. Database fragments committed before this timestamp are matched. (of xs:unsignedLong) @@ -119,7 +120,7 @@ public interface CtsExpr { * Returns a query specifying that matches to matching-query should have their search relevance scores boosted if they also match boosting-query. * * - + *
* Provides a client interface to the cts:boost-query server function. * @param matchingQuery A sub-query that is used for match and scoring. (of cts:query) @@ -142,7 +143,7 @@ public interface CtsExpr { * Returns a geospatial box value. * * - + *
* Provides a client interface to the cts:box server function. * @param south The southern boundary of the box. (of xs:double) @@ -156,7 +157,7 @@ public interface CtsExpr { * Returns a box's eastern boundary. * * - + *
* Provides a client interface to the cts:box-east server function. * @param box The box. (of cts:box) @@ -167,7 +168,7 @@ public interface CtsExpr { * Returns a box's northern boundary. * * - + *
* Provides a client interface to the cts:box-north server function. * @param box The box. (of cts:box) @@ -178,7 +179,7 @@ public interface CtsExpr { * Returns a box's southern boundary. * * - + *
* Provides a client interface to the cts:box-south server function. * @param box The box. (of cts:box) @@ -189,7 +190,7 @@ public interface CtsExpr { * Returns a box's western boundary. * * - + *
* Provides a client interface to the cts:box-west server function. * @param box The box. (of cts:box) @@ -209,7 +210,7 @@ public interface CtsExpr { * Returns a geospatial circle value. * * - + *
* Provides a client interface to the cts:circle server function. * @param radius The radius of the circle. The units for the radius is determined at runtime by the query options (miles is currently the only option). (of xs:double) @@ -221,7 +222,7 @@ public interface CtsExpr { * Returns a circle's center point. * * - + *
* Provides a client interface to the cts:circle-center server function. * @param circle The circle. (of cts:circle) @@ -232,7 +233,7 @@ public interface CtsExpr { * Returns a circle's radius. * * - + *
* Provides a client interface to the cts:circle-radius server function. * @param circle The circle. (of cts:circle) @@ -251,7 +252,7 @@ public interface CtsExpr { * Match documents in at least one of the specified collections. It will match both documents and properties documents in the collections with the given URIs. * * - + *
* Provides a client interface to the cts:collection-query server function. * @param uris One or more collection URIs. A document matches the query if it is in at least one of these collections. (of xs:string) @@ -262,7 +263,7 @@ public interface CtsExpr { * Creates a reference to the collection lexicon, for use as a parameter to cts:value-tuples. Since lexicons are implemented with range indexes, this function will throw an exception if the specified range index does not exist. * * - + *
* Provides a client interface to the cts:collection-reference server function. * @return a server expression with the cts:reference server data type @@ -299,7 +300,7 @@ public interface CtsExpr { * Returns a cts:query matching documents matching a TDE-view column equals to an value. Searches with the cts:column-range-query constructor require the triple index; if the triple index is not configured, then an exception is thrown. * * - + *
* Provides a client interface to the cts:column-range-query server function. * @param schema The TDE schema name. (of xs:string) @@ -391,7 +392,7 @@ public interface CtsExpr { * Returns a geospatial complex polygon value. * * - + *
* Provides a client interface to the cts:complex-polygon server function. * @param outer The outer polygon. (of cts:polygon) @@ -411,7 +412,7 @@ public interface CtsExpr { * Returns a query matching documents in the directories with the given URIs. * * - + *
* Provides a client interface to the cts:directory-query server function. * @param uris One or more directory URIs. (of xs:string) @@ -448,7 +449,7 @@ public interface CtsExpr { * Returns a query matching documents of a given format. * * - + *
* Provides a client interface to the cts:document-format-query server function. * @param format Case insensitve one of: "json","xml","text","binary". This will result in a XDMP-ARG exception in case of an invalid format. (of xs:string) @@ -459,7 +460,7 @@ public interface CtsExpr { * Returns a query that matches all documents where query matches any document fragment. When searching documents, document-properties, or document-locks, this function provides a convenient way to additionally constrain the search against any document fragment. * * - + *
* Provides a client interface to the cts:document-fragment-query server function. * @param query A query to be matched against any document fragment. (of cts:query) @@ -479,7 +480,7 @@ public interface CtsExpr { * Returns a query matching documents with a given permission. * * - + *
* Provides a client interface to the cts:document-permission-query server function. * @param role The role of the permission (of xs:string) @@ -499,7 +500,7 @@ public interface CtsExpr { * Returns a query matching documents with the given URIs. It will match both documents and properties documents with the given URIs. * * - + *
* Provides a client interface to the cts:document-query server function. * @param uris One or more document URIs. (of xs:string) @@ -518,7 +519,7 @@ public interface CtsExpr { * Returns a query matching documents with a given root element. * * - + *
* Provides a client interface to the cts:document-root-query server function. * @param root The root QName to query. (of xs:QName) @@ -540,7 +541,7 @@ public interface CtsExpr { * Returns a query matching elements by name which has specific attributes representing latitude and longitude values for a point contained within the given geographic box, circle, or polygon, or equal to the given point. Points that lie between the southern boundary and the northern boundary of a box, travelling northwards, and between the western boundary and the eastern boundary of the box, travelling eastwards, will match. Points contained within the given radius of the center point of a circle will match, using the curved distance on the surface of the Earth. Points contained within the given polygon will match, using great circle arcs over a spherical model of the Earth as edges. An error may result if the polygon is malformed in some way. Points equal to the a given point will match, taking into account the fact that longitudes converge at the poles. Using the geospatial query constructors requires a valid geospatial license key; without a valid license key, searches that include geospatial queries will throw an exception. * * - + *
* Provides a client interface to the cts:element-attribute-pair-geospatial-query server function. * @param elementName One or more parent element QNames to match. When multiple QNames are specified, the query matches if any QName matches. (of xs:QName) @@ -615,7 +616,7 @@ public interface CtsExpr { * Constructs a query that matches element-attributes by name with a range-index entry equal to a given value. An element attribute range index on the specified QName(s) must exist when you use this query in a search; if no such range index exists, the search throws an exception. * * - + *
* Provides a client interface to the cts:element-attribute-range-query server function. * @param elementName One or more element QNames to match. When multiple QNames are specified, the query matches if any QName matches. (of xs:QName) @@ -688,7 +689,7 @@ public interface CtsExpr { * Creates a reference to an element attribute value lexicon, for use as a parameter to cts:value-tuples. Since lexicons are implemented with range indexes, this function will throw an exception if the specified range index does not exist. * * - + *
* Provides a client interface to the cts:element-attribute-reference server function. * @param element An element QName. (of xs:QName) @@ -730,7 +731,7 @@ public interface CtsExpr { * Returns a query matching elements by name with attributes by name with text content equal a given phrase. * * - + *
* Provides a client interface to the cts:element-attribute-value-query server function. * @param elementName One or more element QNames to match. When multiple QNames are specified, the query matches if any QName matches. (of xs:QName) @@ -799,7 +800,7 @@ public interface CtsExpr { * Returns a query matching elements by name with attributes by name with text content containing a given phrase. * * - + *
* Provides a client interface to the cts:element-attribute-word-query server function. * @param elementName One or more element QNames to match. When multiple QNames are specified, the query matches if any QName matches. (of xs:QName) @@ -868,7 +869,7 @@ public interface CtsExpr { * Returns a query matching elements by name which has specific element children representing latitude and longitude values for a point contained within the given geographic box, circle, or polygon, or equal to the given point. Points that lie between the southern boundary and the northern boundary of a box, travelling northwards, and between the western boundary and the eastern boundary of the box, travelling eastwards, will match. Points contained within the given radius of the center point of a circle will match, using the curved distance on the surface of the Earth. Points contained within the given polygon will match, using great circle arcs over a spherical model of the Earth as edges. An error may result if the polygon is malformed in some way. Points equal to the a given point will match, taking into account the fact that longitudes converge at the poles. Using the geospatial query constructors requires a valid geospatial license key; without a valid license key, searches that include geospatial queries will throw an exception. * * - + *
* Provides a client interface to the cts:element-child-geospatial-query server function. * @param elementName One or more parent element QNames to match. When multiple QNames are specified, the query matches if any QName matches. (of xs:QName) @@ -936,7 +937,7 @@ public interface CtsExpr { * Returns a query matching elements by name whose content represents a point contained within the given geographic box, circle, or polygon, or equal to the given point. Points that lie between the southern boundary and the northern boundary of a box, travelling northwards, and between the western boundary and the eastern boundary of the box, travelling eastwards, will match. Points contained within the given radius of the center point of a circle will match, using the curved distance on the surface of the Earth. Points contained within the given polygon will match, using great circle arcs over a spherical model of the Earth as edges. An error may result if the polygon is malformed in some way. Points equal to the a given point will match, taking into account the fact that longitudes converge at the poles. Using the geospatial query constructors requires a valid geospatial license key; without a valid license key, searches that include geospatial queries will throw an exception. * * - + *
* Provides a client interface to the cts:element-geospatial-query server function. * @param elementName One or more element QNames to match. When multiple QNames are specified, the query matches if any QName matches. (of xs:QName) @@ -1001,7 +1002,7 @@ public interface CtsExpr { * Returns a query matching elements by name which has specific element children representing latitude and longitude values for a point contained within the given geographic box, circle, or polygon, or equal to the given point. Points that lie between the southern boundary and the northern boundary of a box, travelling northwards, and between the western boundary and the eastern boundary of the box, travelling eastwards, will match. Points contained within the given radius of the center point of a circle will match, using the curved distance on the surface of the Earth. Points contained within the given polygon will match, using great circle arcs over a spherical model of the Earth as edges. An error may result if the polygon is malformed in some way. Points equal to the a given point will match, taking into account the fact that longitudes converge at the poles. Using the geospatial query constructors requires a valid geospatial license key; without a valid license key, searches that include geospatial queries will throw an exception. * * - + *
* Provides a client interface to the cts:element-pair-geospatial-query server function. * @param elementName One or more parent element QNames to match. When multiple QNames are specified, the query matches if any QName matches. (of xs:QName) @@ -1074,7 +1075,7 @@ public interface CtsExpr { * Constructs a query that matches elements by name with the content constrained by the query given in the second parameter. Searches for matches in the specified element and all of its descendants. If the query specified in the second parameter includes any element attribute sub-queries, it will search attributes on the specified element and attributes on any descendant elements. See the second example below). * * - + *
* Provides a client interface to the cts:element-query server function. * @param elementName One or more element QNames to match. When multiple QNames are specified, the query matches if any QName matches. (of xs:QName) @@ -1096,7 +1097,7 @@ public interface CtsExpr { * Constructs a query that matches elements by name with range index entry equal to a given value. Searches that use an element range query require an element range index on the specified QName(s); if no such range index exists, then an exception is thrown. * * - + *
* Provides a client interface to the cts:element-range-query server function. * @param elementName One or more element QNames to match. When multiple QNames are specified, the query matches if any QName matches. (of xs:QName) @@ -1163,7 +1164,7 @@ public interface CtsExpr { * Creates a reference to an element value lexicon, for use as a parameter to cts:value-tuples, temporal:axis-create, or any other function that takes an index reference. Since lexicons are implemented with range indexes, this function will throw an exception if the specified range index does not exist. * * - + *
* Provides a client interface to the cts:element-reference server function. * @param element An element QName. (of xs:QName) @@ -1200,7 +1201,7 @@ public interface CtsExpr { * Returns a query matching elements by name with text content equal a given phrase. cts:element-value-query only matches against simple elements (that is, elements that contain only text and have no element children). * * - + *
* Provides a client interface to the cts:element-value-query server function. * @param elementName One or more element QNames to match. When multiple QNames are specified, the query matches if any QName matches. (of xs:QName) @@ -1280,7 +1281,7 @@ public interface CtsExpr { * Returns a query matching elements by name with text content containing a given phrase. Searches only through immediate text node children of the specified element as well as any text node children of child elements defined in the Admin Interface as element-word-query-throughs or phrase-throughs; does not search through any other children of the specified element. If neither word searches nor stemmed word searches is enabled for the target database, an XDMP-SEARCH error is thrown. * * - + *
* Provides a client interface to the cts:element-word-query server function. * @param elementName One or more element QNames to match. When multiple QNames are specified, the query matches if any QName matches. (of xs:QName) @@ -1334,7 +1335,7 @@ public interface CtsExpr { * Returns a query that matches no fragments. * * - + *
* Provides a client interface to the cts:false-query server function. * @return a server expression with the cts:query server data type @@ -1354,7 +1355,7 @@ public interface CtsExpr { * Returns a cts:query matching fields by name with a range-index entry equal to a given value. Searches with the cts:field-range-query constructor require a field range index on the specified field name(s); if there is no range index configured, then an exception is thrown. * * - + *
* Provides a client interface to the cts:field-range-query server function. * @param fieldName One or more field names to match. When multiple field names are specified, the query matches if any field name matches. (of xs:string) @@ -1421,7 +1422,7 @@ public interface CtsExpr { * Creates a reference to a field value lexicon, for use as a parameter to cts:value-tuples. Since lexicons are implemented with range indexes, this function will throw an exception if the specified range index does not exist. * * - + *
* Provides a client interface to the cts:field-reference server function. * @param field A field name. (of xs:string) @@ -1459,7 +1460,7 @@ public interface CtsExpr { * Returns a query matching text content containing a given value in the specified field. If the specified field does not exist, cts:field-value-query throws an exception. If the specified field does not have the index setting field value searches enabled, either for the database or for the specified field, then a cts:search with a cts:field-value-query throws an exception. A field is a named object that specified elements to include and exclude from a search, and can include score weights for any included elements. You create fields at the database level using the Admin Interface. For details on fields, see the chapter on "Fields Database Settings" in the Administrator's Guide. * * - + *
* Provides a client interface to the cts:field-value-query server function. * @param fieldName One or more field names to search over. If multiple field names are supplied, the match can be in any of the specified fields (or-query semantics). (of xs:string) @@ -1522,7 +1523,7 @@ public interface CtsExpr { * Returns a query matching fields with text content containing a given phrase. If the specified field does not exist, this function throws an exception. A field is a named object that specified elements to include and exclude from a search, and can include score weights for any included elements. You create fields at the database level using the Admin Interface. For details on fields, see the chapter on "Fields Database Settings" in the Administrator's Guide. * * - + *
* Provides a client interface to the cts:field-word-query server function. * @param fieldName One or more field names to search over. If multiple field names are supplied, the match can be in any of the specified fields (or-query semantics). (of xs:string) @@ -1584,7 +1585,7 @@ public interface CtsExpr { * Creates a reference to a geospatial path range index, for use as a parameter to cts:value-tuples. This function will throw an exception if the specified range index does not exist. * * - + *
* Provides a client interface to the cts:geospatial-path-reference server function. * @param pathExpression A path expression. (of xs:string) @@ -1641,7 +1642,7 @@ public interface CtsExpr { * Create a reference to a geospatial region path index, for use as a parameter to cts:geospatial-region-query and other query operations on geospatial region indexes. This function throws an exception if the specified region path index does not exist. * * - + *
* Provides a client interface to the cts:geospatial-region-path-reference server function. * @param pathExpression The XPath expression specified in the index configuration. (of xs:string) @@ -1772,7 +1773,7 @@ public interface CtsExpr { * Construct a query to match regions in documents that satisfy a specified relationship relative to other regions. For example, regions in documents that intersect with regions specified in the search criteria. * * - + *
* Provides a client interface to the cts:geospatial-region-query server function. * @param reference Zero or more geospatial path region index references that identify regions in your content. To create a reference, see cts:geospatial-region-path-reference. (of cts:reference) @@ -1831,7 +1832,7 @@ public interface CtsExpr { * Creates a reference to the URI lexicon, for use as a parameter to cts:value-tuples. This function requires the URI lexicon to be enabled, otherwise it throws an exception. This reference returns URIs as IRIs. * * - + *
* Provides a client interface to the cts:iri-reference server function. * @return a server expression with the cts:reference server data type @@ -1851,7 +1852,7 @@ public interface CtsExpr { * Returns a query matching json properties by name which has specific children representing latitude and longitude values for a point contained within the given geographic box, circle, or polygon, or equal to the given point. Points that lie between the southern boundary and the northern boundary of a box, travelling northwards, and between the western boundary and the eastern boundary of the box, travelling eastwards, will match. Points contained within the given radius of the center point of a circle will match, using the curved distance on the surface of the Earth. Points contained within the given polygon will match, using great circle arcs over a spherical model of the Earth as edges. An error may result if the polygon is malformed in some way. Points equal to the a given point will match, taking into account the fact that longitudes converge at the poles. Using the geospatial query constructors requires a valid geospatial license key; without a valid license key, searches that include geospatial queries will throw an exception. * * - + *
* Provides a client interface to the cts:json-property-child-geospatial-query server function. * @param propertyName One or more parent property names to match. When multiple names are specified, the query matches if any name matches. (of xs:string) @@ -1919,7 +1920,7 @@ public interface CtsExpr { * Returns a query matching json properties by name whose content represents a point contained within the given geographic box, circle, or polygon, or equal to the given point. Points that lie between the southern boundary and the northern boundary of a box, travelling northwards, and between the western boundary and the eastern boundary of the box, travelling eastwards, will match. Points contained within the given radius of the center point of a circle will match, using the curved distance on the surface of the Earth. Points contained within the given polygon will match, using great circle arcs over a spherical model of the Earth as edges. An error may result if the polygon is malformed in some way. Points equal to the a given point will match, taking into account the fact that longitudes converge at the poles. Using the geospatial query constructors requires a valid geospatial license key; without a valid license key, searches that include geospatial queries will throw an exception. * * - + *
* Provides a client interface to the cts:json-property-geospatial-query server function. * @param propertyName One or more json property names to match. When multiple names are specified, the query matches if any name matches. (of xs:string) @@ -1984,7 +1985,7 @@ public interface CtsExpr { * Returns a query matching json properties by name which has specific property children representing latitude and longitude values for a point contained within the given geographic box, circle, or polygon, or equal to the given point. Points that lie between the southern boundary and the northern boundary of a box, travelling northwards, and between the western boundary and the eastern boundary of the box, travelling eastwards, will match. Points contained within the given radius of the center point of a circle will match, using the curved distance on the surface of the Earth. Points contained within the given polygon will match, using great circle arcs over a spherical model of the Earth as edges. An error may result if the polygon is malformed in some way. Points equal to the a given point will match, taking into account the fact that longitudes converge at the poles. Using the geospatial query constructors requires a valid geospatial license key; without a valid license key, searches that include geospatial queries will throw an exception. * * - + *
* Provides a client interface to the cts:json-property-pair-geospatial-query server function. * @param propertyName One or more parent property names to match. When multiple names are specified, the query matches if any name matches. (of xs:string) @@ -2058,7 +2059,7 @@ public interface CtsExpr { * Returns a cts:query matching JSON properties by name with a range-index entry equal to a given value. Searches with the cts:json-property-range-query constructor require a property range index on the specified names; if there is no range index configured, then an exception is thrown. * * - + *
* Provides a client interface to the cts:json-property-range-query server function. * @param propertyName One or more property name to match. When multiple names are specified, the query matches if any name matches. (of xs:string) @@ -2125,7 +2126,7 @@ public interface CtsExpr { * Creates a reference to a JSON property value lexicon, for use as a parameter to cts:value-tuples. Since lexicons are implemented with range indexes, this function will throw an exception if the specified range index does not exist. * * - + *
* Provides a client interface to the cts:json-property-reference server function. * @param property A property name. (of xs:string) @@ -2163,7 +2164,7 @@ public interface CtsExpr { * Returns a cts:query matching JSON properties by name with the content constrained by the given cts:query in the second parameter. Searches for matches in the specified property and all of its descendants. * * - + *
* Provides a client interface to the cts:json-property-scope-query server function. * @param propertyName One or more property names to match. When multiple names are specified, the query matches if any name matches. (of xs:string) @@ -2184,7 +2185,7 @@ public interface CtsExpr { * Returns a query matching JSON properties by name with value equal the given value. For arrays, the query matches if the value of any elements in the array matches the given value. * * - + *
* Provides a client interface to the cts:json-property-value-query server function. * @param propertyName One or more property names to match. When multiple names are specified, the query matches if any name matches. (of xs:string) @@ -2247,7 +2248,7 @@ public interface CtsExpr { * Returns a query matching JSON properties by name with text content containing a given phrase. Searches only through immediate text node children of the specified property. * * - + *
* Provides a client interface to the cts:json-property-word-query server function. * @param propertyName One or more JSON property names to match. When multiple names are specified, the query matches if any name matches. (of xs:string) @@ -2309,7 +2310,7 @@ public interface CtsExpr { * Returns a geospatial linestring value. * * - + *
* Provides a client interface to the cts:linestring server function. * @param vertices The waypoints of the linestring, given in order. Alternatively, the vertices may be provided as a string that follows the well-known text (WKT) scheme for a linestring. (of xs:anyAtomicType) @@ -2320,7 +2321,7 @@ public interface CtsExpr { * Returns a query that matches all documents where query matches document-locks. When searching documents or document-properties, cts:locks-fragment-query provides a convenient way to additionally constrain the search against document-locks fragments. * * - + *
* Provides a client interface to the cts:locks-fragment-query server function. * @param query A query to be matched against the locks fragment. (of cts:query) @@ -2339,7 +2340,7 @@ public interface CtsExpr { * Returns only documents before LSQT or a timestamp before LSQT for stable query results. * * - + *
* Provides a client interface to the cts:lsqt-query server function. * @param temporalCollection The name of the temporal collection. (of xs:string) @@ -2418,7 +2419,7 @@ public interface CtsExpr { * Returns a query matching all of the specified queries, where the matches occur within the specified distance from each other. * * - + *
* Provides a client interface to the cts:near-query server function. * @param queries A sequence of queries to match. (of cts:query) @@ -2489,7 +2490,7 @@ public interface CtsExpr { * Returns a query matching the first sub-query, where those matches do not occur within 0 distance of the other query. * * - + *
* Provides a client interface to the cts:not-in-query server function. * @param positiveQuery A positive query, specifying the search results filtered in. (of cts:query) @@ -2501,7 +2502,7 @@ public interface CtsExpr { * Returns a query specifying the matches not specified by its sub-query. * * - + *
* Provides a client interface to the cts:not-query server function. * @param query A negative query, specifying the search results to filter out. (of cts:query) @@ -2520,7 +2521,7 @@ public interface CtsExpr { * Returns a query specifying the union of the matches specified by the sub-queries. * * - + *
* Provides a client interface to the cts:or-query server function. * @param queries A sequence of sub-queries. (of cts:query) @@ -2549,7 +2550,7 @@ public interface CtsExpr { * Returns the part of speech for a cts:token, if any. * * - + *
* Provides a client interface to the cts:part-of-speech server function. * @param token A token, as returned from cts:tokenize. (of xs:string) @@ -2569,7 +2570,7 @@ public interface CtsExpr { * Returns a query matching path expressions whose content represents a point contained within the given geographic box, circle, or polygon, or equal to the given point. Points that lie between the southern boundary and the northern boundary of a box, travelling northwards, and between the western boundary and the eastern boundary of the box, travelling eastwards, will match. Points contained within the given radius of the center point of a circle will match, using the curved distance on the surface of the Earth. Points contained within the given polygon will match, using great circle arcs over a spherical model of the Earth as edges. An error may result if the polygon is malformed in some way. Points equal to the a given point will match, taking into account the fact that longitudes converge at the poles. Using the geospatial query constructors requires a valid geospatial license key; without a valid license key, searches that include geospatial queries will throw an exception. * * - + *
* Provides a client interface to the cts:path-geospatial-query server function. * @param pathExpression One or more path expressions to match. When multiple path expressions are specified, the query matches if any path expression matches. (of xs:string) @@ -2633,7 +2634,7 @@ public interface CtsExpr { * Returns a cts:query matching documents where the content addressed by an XPath expression satisfies the specified relationship (=, <, >, etc.) with respect to the input criteria values. A path range index must exist for each path when you perform a search. * * - + *
* Provides a client interface to the cts:path-range-query server function. * @param pathName One or more XPath expressions that identify the content to match. When multiple paths are specified, the query matches if any path matches. (of xs:string) @@ -2700,7 +2701,7 @@ public interface CtsExpr { * Creates a reference to a path value lexicon, for use as a parameter to cts:value-tuples. Since lexicons are implemented with range indexes, this function will throw an exception if the specified range index does not exist. * * - + *
* Provides a client interface to the cts:path-reference server function. * @param pathExpression A path range index expression. (of xs:string) @@ -2758,7 +2759,7 @@ public interface CtsExpr { * Creates a period value, for use as a parameter to cts:period-range-query or cts:period-compare-query. * * - + *
* Provides a client interface to the cts:period server function. * @param start The dateTime value indicating start of the period. (of xs:dateTime) @@ -2780,7 +2781,7 @@ public interface CtsExpr { * Returns a cts:query matching documents that have relevant pair of period values. Searches with the cts:period-compare-query constructor require two valid names of period, if the either of the specified period does not exist, then an exception is thrown. * * - + *
* Provides a client interface to the cts:period-compare-query server function. * @param axis1 Name of the first axis to compare (of xs:string) @@ -2824,7 +2825,7 @@ public interface CtsExpr { * Returns a cts:query matching axis by name with a period value with an operator. Searches with the cts:period-range-query constructor require a axis definition on the axis name; if there is no axis configured, then an exception is thrown. * * - + *
* Provides a client interface to the cts:period-range-query server function. * @param axis One or more axis to match on. (of xs:string) @@ -2894,7 +2895,7 @@ public interface CtsExpr { * Returns a point value. * * - + *
* Provides a client interface to the cts:point server function. * @param latitudeOrWkt The latitude of the point. Alternatively, the vertex may be provided as a string that follows the well-known text (WKT) scheme for a point. (of xs:double) @@ -2906,7 +2907,7 @@ public interface CtsExpr { * Returns a point's latitude value. * * - + *
* Provides a client interface to the cts:point-latitude server function. * @param point The point. (of cts:point) @@ -2917,7 +2918,7 @@ public interface CtsExpr { * Returns a point's longitude value. * * - + *
* Provides a client interface to the cts:point-longitude server function. * @param point The point. (of cts:point) @@ -2945,7 +2946,7 @@ public interface CtsExpr { * Returns a query that matches all documents where query matches document-properties. When searching documents or document-locks, this query type provides a convenient way to additionally constrain the search against document-properties fragments. * * - + *
* Provides a client interface to the cts:properties-fragment-query server function. * @param query A query to be matched against the properties fragment. (of cts:query) @@ -2966,7 +2967,7 @@ public interface CtsExpr { * Returns a cts:query matching specified nodes with a range-index entry compared to a given value. Searches with the cts:range-query constructor require a range index; if there is no range index configured, then an exception is thrown. * * - + *
* Provides a client interface to the cts:range-query server function. * @param index One or more range index references. When multiple indexes are specified, the query matches if any index matches. (of cts:reference) @@ -3025,7 +3026,7 @@ public interface CtsExpr { * Returns the stem(s) for a word. * * - + *
* Provides a client interface to the cts:stem server function. * @param text A word or phrase to stem. (of xs:string) @@ -3074,7 +3075,7 @@ public interface CtsExpr { * Tokenizes text into words, punctuation, and spaces. Returns output in the type cts:token, which has subtypes cts:word, cts:punctuation, and cts:space, all of which are subtypes of xs:string. * * - + *
* Provides a client interface to the cts:tokenize server function. * @param text A word or phrase to tokenize. (of xs:string) @@ -3133,7 +3134,7 @@ public interface CtsExpr { * Returns a cts:query matching triples with a triple index entry equal to the given values. Searches with the cts:triple-range-query constructor require the triple index; if the triple index is not configured, then an exception is thrown. * * - + *
* Provides a client interface to the cts:triple-range-query server function. * @param subject The subjects to look up. When multiple values are specified, the query matches if any value matches. When the empty sequence is specified, then triples with any subject are matched. (of xs:anyAtomicType) @@ -3218,7 +3219,7 @@ public interface CtsExpr { * Returns a query that matches all fragments. * * - + *
* Provides a client interface to the cts:true-query server function. * @return a server expression with the cts:query server data type @@ -3228,7 +3229,7 @@ public interface CtsExpr { * Creates a reference to the URI lexicon, for use as a parameter to cts:value-tuples. This function requires the URI lexicon to be enabled, otherwise it throws an exception. * * - + *
* Provides a client interface to the cts:uri-reference server function. * @return a server expression with the cts:reference server data type @@ -3246,13 +3247,21 @@ public interface CtsExpr { * Returns a query matching text content containing a given phrase. * * - + *
* Provides a client interface to the cts:word-query server function. * @param text Some words or phrases to match. When multiple strings are specified, the query matches if any string matches. (of xs:string) * @return a server expression with the cts:query server data type */ public CtsQueryExpr wordQuery(ServerExpression text); +/** + * Returns a query matching text content containing a given phrase. + *
+ * Provides a client interface to the cts:word-query server function. + * @param text A parameter placeholder for words or phrases to match. When multiple strings are specified, the query matches if any string matches. (of xs:string) + * @return a server expression with the cts:query server data type + */ + public CtsQueryExpr wordQuery(PlanParamExpr text); /** * Returns a query matching text content containing a given phrase. *
@@ -3297,49 +3306,49 @@ public interface CtsExpr {
* @return a CtsBoxSeqExpr sequence
*/
public CtsBoxSeqExpr boxSeq(CtsBoxExpr... items);
-
+
/**
* Constructs a sequence of CtsCircleExpr items.
* @param items the CtsCircleExpr items collected by the sequence
* @return a CtsCircleSeqExpr sequence
*/
public CtsCircleSeqExpr circleSeq(CtsCircleExpr... items);
-
+
/**
* Constructs a sequence of CtsPeriodExpr items.
* @param items the CtsPeriodExpr items collected by the sequence
* @return a CtsPeriodSeqExpr sequence
*/
public CtsPeriodSeqExpr periodSeq(CtsPeriodExpr... items);
-
+
/**
* Constructs a sequence of CtsPointExpr items.
* @param items the CtsPointExpr items collected by the sequence
* @return a CtsPointSeqExpr sequence
*/
public CtsPointSeqExpr pointSeq(CtsPointExpr... items);
-
+
/**
* Constructs a sequence of CtsPolygonExpr items.
* @param items the CtsPolygonExpr items collected by the sequence
* @return a CtsPolygonSeqExpr sequence
*/
public CtsPolygonSeqExpr polygonSeq(CtsPolygonExpr... items);
-
+
/**
* Constructs a sequence of CtsQueryExpr items.
* @param items the CtsQueryExpr items collected by the sequence
* @return a CtsQuerySeqExpr sequence
*/
public CtsQuerySeqExpr querySeq(CtsQueryExpr... items);
-
+
/**
* Constructs a sequence of CtsReferenceExpr items.
* @param items the CtsReferenceExpr items collected by the sequence
* @return a CtsReferenceSeqExpr sequence
*/
public CtsReferenceSeqExpr referenceSeq(CtsReferenceExpr... items);
-
+
/**
* Constructs a sequence of CtsRegionExpr items.
* @param items the CtsRegionExpr items collected by the sequence
diff --git a/marklogic-client-api/src/main/java/com/marklogic/client/impl/CtsExprImpl.java b/marklogic-client-api/src/main/java/com/marklogic/client/impl/CtsExprImpl.java
index ac90029ed..6fbda3038 100644
--- a/marklogic-client-api/src/main/java/com/marklogic/client/impl/CtsExprImpl.java
+++ b/marklogic-client-api/src/main/java/com/marklogic/client/impl/CtsExprImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2025 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
+ * Copyright (c) 2010-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
*/
package com.marklogic.client.impl;
@@ -16,6 +16,7 @@
import com.marklogic.client.type.XsUnsignedLongVal;
import com.marklogic.client.type.ServerExpression;
+import com.marklogic.client.type.PlanParamExpr;
import com.marklogic.client.type.CtsBoxExpr;
import com.marklogic.client.type.CtsBoxSeqExpr;
import com.marklogic.client.type.CtsCircleExpr;
@@ -2178,6 +2179,12 @@ public CtsQueryExpr wordQuery(ServerExpression text) {
}
+ @Override
+ public CtsQueryExpr wordQuery(PlanParamExpr text) {
+ return new QueryCallImpl("cts", "word-query", new Object[]{ text });
+ }
+
+
@Override
public CtsQueryExpr wordQuery(String text, String... options) {
return wordQuery((text == null) ? (XsStringVal) null : xs.string(text), (options == null) ? (XsStringVal) null : xs.stringSeq(options));
diff --git a/marklogic-client-api/src/test/java/com/marklogic/client/test/rows/CtsParamTest.java b/marklogic-client-api/src/test/java/com/marklogic/client/test/rows/CtsParamTest.java
new file mode 100644
index 000000000..e66cab9c1
--- /dev/null
+++ b/marklogic-client-api/src/test/java/com/marklogic/client/test/rows/CtsParamTest.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2010-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
+ */
+package com.marklogic.client.test.rows;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.marklogic.client.expression.PlanBuilder;
+import com.marklogic.client.io.JacksonHandle;
+import com.marklogic.client.row.RowManager;
+import com.marklogic.client.row.RowRecord;
+import com.marklogic.client.test.AbstractClientTest;
+import com.marklogic.client.test.Common;
+import com.marklogic.client.test.junit5.RequiresML12;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
+
+import java.util.List;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+@ExtendWith(RequiresML12.class)
+class CtsParamTest extends AbstractClientTest {
+
+ private RowManager rowManager;
+ private PlanBuilder op;
+
+ @BeforeEach
+ void setup() {
+ rowManager = Common.newClient().newRowManager();
+ op = rowManager.newPlanBuilder();
+ }
+
+ @Test
+ void wordQuery() {
+ PlanBuilder.ModifyPlan plan = op.fromView("opticUnitTest", "musician", "")
+ .where(op.cts.wordQuery(op.param("myName")));
+
+ // Print the plan so it can be easily imported via qconsole to verify it's valid.
+ JsonNode serializedPlan = plan.export(new JacksonHandle()).get();
+ System.out.println("Plan: " + serializedPlan.toPrettyString());
+
+ List