I am working on MarkLogic Optic API (Template Driven Extraction; TDE) and trying to run a query using Java API. I am having trouble extracting data from a nested template. where I am applying simple equals operation like
let $template := op:from-view("records", "recordsView")
let $templateProducts :=op:from-view("records", "products")
let $templateOccurrences :=op:from-view("records", "occurrences")
return $template
=>op:join-inner(op:from-view("records", "products")
=>op:join-inner(op:from-view("records", "occurrences"), op:on(op:view-col("products", "md5Digest"), op:view-col("occurrences", "md5Digest"))), op:on(op:view-col("products", "md5Digest"), op:view-col("recordsView", "md5Digest")))
=>op:where(op:eq(op:col("adDescription"), "QSR/CEC"))
=>op:result()
then it throws error
XDMP-TRPLPERMNOTFOUND: plan:execute(plan:sparql(" * { http://marklogic.com/templateview . http://marklogic.com/templateview . http://marklogic.com/templateview . FILTER (products.md5Digest eq occurrences.md5Digest) FILTER (products.md5Digest eq recordsView.md5Digest) FILTER (adDescription eq Q{http://www.w3.org/2001/XMLSchema}string("QSR/CEC")) }"), (), ()) -- Triple index permutation not enabled
here it is using sparql but i want to use just optic sql also i don't want to enable triple index permutation. i don't know exactly whats wrong. any help is appreciated.
Has the database been upgraded from a prior version to MarkLogic 9?
If so, it might be necessary to reindex the database:
http://docs.marklogic.com/messages/XDMP-en/XDMP-TRPLPERMNOTFOUND
Hoping that helps,