LOC-6: isbn index: Check we have a literal before substring
authorHeikki Levanto <heikki@indexdata.dk>
Fri, 8 May 2015 14:11:48 +0000 (16:11 +0200)
committerHeikki Levanto <heikki@indexdata.dk>
Fri, 8 May 2015 14:11:48 +0000 (16:11 +0200)
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