LOC-6: isbn index: Check we have a literal before substring
[mp-sparql-moved-to-github.git] / bibframe / triplestore.xml
index 7fd29fd..eb5db31 100644 (file)
             <!--   http://isbn.example.org/1906833214 which we need to search -->
             <!-- by our usual substring match. Or they can be links to Identivfiers -->
             <!-- which will have a proper identifierValue on which we can do -->
-            <!-- an exact match -->
+            <!-- an exact match.  -->
             <index type="bf.isbn">
                 {
                     ?thing bf:isbn10  %v
-                        FILTER(contains(str(%v), %s))
+                        FILTER(isLiteral(%v) &amp;&amp; contains(%v, %s))
                 } UNION {
                     ?thing bf:isbn13  %v
-                        FILTER(contains(str(%v), %s))
+                        FILTER(isLiteral(%v) &amp;&amp; contains(%v, %s))
                 } UNION {
                     {
                         ?thing bf:isbn10 ?isbn