I'm trying to add an range index on a Native JSON property which has colon(:) in its name in MarkLogic Server.
The sample data is as follows.
{
"Aspects": {
"xbrl28:TransactionTime": "2014-08-13T00:00:00+0000",
"xbrl28:Archive": "S1002U7K",
"xbrl:Period": "2014-08-13"
},
"_id": "27948e6d-a774-49ee-8e30-668cc4731975"
}
When I tried to add an range index on "xbrl28:Archive", but I cannot, because the "xbrl28:" was treated as prefix of a namespace. Is there any way to escape the colon?
You cannot use element range indexes for JSON properties with colons, spaces or any other name that does not conform to xs:QName. I haven't tried, but you could try using a path index with an expression like: node()[name() = "xbrl28:Archive"]
or better: text("xbrl28:Archive")
.
HTH!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With