[英]Can we put triples in specific graph or collections for Triples generated via TDE?
[英]How to put dynamic date filter in TDE?
在“上下文”中如何使用日期 function? 我只想在 ML 中攝取的文檔的最后 10 天保留三元組。
<template xmlns="http://marklogic.com/xdmp/tde">
<context>/MedlineCitation[createDate > ( fn:currentDateTime() - xs:dayTimeDuration('P10D')]</context>
<triples>
<triple>
<subject>
<val>sem:iri(concat(ForeName,' ',LastName))</val>
</subject>
<predicate>
<val>sem:iri('authored')</val>
</predicate>
<object>
<val>xs:string(../../ArticleTitle)</val>
</object>
</triple>
</triples>
</template>
function 是fn:current-dateTime()
,而不是fn:currentDateTime()
,並且您缺少結尾)
:
/MedlineCitation[createDate > ( fn:current-dateTime() - xs:dayTimeDuration('P10D') )]
但是,在更正代碼之后,您會發現它返回XDMP-UNINDEXABLEPATH
。
對於可索引路徑表達式的允許表達式和函數存在限制和限制。 請參閱: https://docs.marklogic.com/guide/xquery/xpath#id_18473
有關謂詞表達式中可調用函數的列表,請參閱: https://docs.marklogic.com/guide/xquery/xpath#id_51541
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.