Skip to main content

What's New in MarkLogic 11

Triple Index and SPARQL Engine Changes

The triple index and SPARQL engine were changed in MarkLogic 9. Now as part of a query, two triples are considered equal if their subjects, predicates, and objects compare as equal with the SPARQL “=” operator.

Previously, these triples would be treated as two different, non-identical triples:

sem:triple(xs:anyURI("http://a"), xs:anyURI("http://b"), xs:anyURI("http://c")),
sem:triple("http://a", "http://b", "http://c").

In MarkLogic 9 and later, values of type xs:string and xs:anyURI can compare equal if they have the same lexical form according to the SPARQL “=” operator. This functionality is called D-entailment (D as in datatype). The two triples in the example are now considered to be the same, and the de-duplication process removes the duplicate. If you return frequencies, you would see the second triple show up as one extra in the frequencies.

Also note that the query may return either sem:triple(xs:anyURI("http://a"), xs:anyURI("http://b"), xs:anyURI("http://c")), or sem:triple("http://a", "http://b", "http://c") as the result since they are considered equal.