Loading TOC...

MarkLogic 12 EA 2 Product Documentation
cts.propertiesFragmentQuery

cts.propertiesFragmentQuery(
   query as cts.query
) as cts.propertiesFragmentQuery

Summary

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.

Parameters
query A query to be matched against the properties fragment.

Example

cts.search(
  cts.propertiesFragmentQuery(
    cts.elementRangeQuery(
        xs.QName('prop:last-modified'),'>',
        fn.currentDateTime().subtract(xs.dayTimeDuration('P1D')))));

//  All documents modified up to one day in the past.
//  Note that this example requires a dateTime range index on:
//  namespace: http://marklogic.com/xdmp/property
//  local name: last-modified

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.