Hello, I am working with a database of text documents. I have extracted some structured metadata from these documents and added these values as document properties, e.g.:
<prop:properties xmlns:prop="http://marklogic.com/xdmp/property"> <deliverytime>2011-07-06T12:45:55.7887784</deliverytime> </prop:properties> I wanted to add an element range index for this property, which the documentation says is possible even for document properties. So, via the admin interface I created an element range index: [cid:[email protected]] I then went back to the Configure view for my database and selected 'Reindex.' Now I would like to confirm that the range index is working, so I tried a few different CTS expressions: A cts:properties-query: cts:search(doc(), cts:properties-query( cts:element-range-query(xs:QName("deliverytime"), "<=", xs:date("2011-01-01")) )) An element range query, with xdmp:document-properties() as the expression: cts:search(xdmp:document-properties(), cts:element-range-query(xs:QName("deliverytime"), "<=", xs:date("2011-01-01")) ) An element range query, with doc() as the expression: cts:search(doc(), cts:element-range-query(xs:QName("deliverytime"), "<=", xs:date("2011-01-01") )) It doesn't seem to matter which I try, they all return an error indicating: No date element range index for deliverytime Any idea what I might have missed? Also, a bonus question: How might I combine a free text search (against the contents of my text documents) with a document properties query like the above, expressed as a search:search function? Thank you, David
_______________________________________________ General mailing list [email protected] Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
