CrazyNerd
CrazyNerd

Reputation: 63

Marklogic - range query using xdmp:document-timestamp

I want to search all documents between 2 dates using xdmp:document-timestamp.

Is it possible to do so ?

Upvotes: 1

Views: 157

Answers (1)

grtjn
grtjn

Reputation: 20414

The timestamp property of documents is not indexed, so using that to limit search results would be very expensive. Use the last-modified property instead, or add your own element/property for that goal, apply a date or dateTime range index on it, and use element-range-queries to constrain your searches.

HTH!

Upvotes: 2

Related Questions