All "targets" settings now use pz:id= instead of pz:id~ (pattern matching)
authorMike Taylor <mike@indexdata.com>
Tue, 24 Jun 2014 10:15:45 +0000 (12:15 +0200)
committerMike Taylor <mike@indexdata.com>
Tue, 24 Jun 2014 10:15:45 +0000 (12:15 +0200)
All "targets" settings now have (incorrect, but working) trailing
slashes. Why is this? The Service-proxy has code that mangles ZURLs
for the use of the CF (adding rich-database-name parameters), and its
lax regular expression wrongly interprets the trailing ":3552" as a
port number. So it "fixes" this ZURL by appending a slash, and then
uses the fixed version of the URL as its unique ID. The result is that
even though the ZURL in the Torus record is
        lui.indexdata.com:8080/solr4/select?fq=database:3552
the ID that it uses is
        lui.indexdata.com:8080/solr4/select?fq=database:3552/
And indeed if I change the MKWS code to use this ID instead of the
correct one, it can be made to work.

These should soon be replaced by much less fragile UDB-based target
filtering.

examples/htdocs/auto3.html

index d1e9e6d..4fef994 100644 (file)
@@ -38,7 +38,7 @@
 <div class='mkwsRecords mkwsTeam_plos'
        autosearch='dinosaur'
        sort='relevance'
-       targets='pz:id~lui.indexdata.com:8080/solr4/select?fq=database:6265'
+       targets='pz:id=lui.indexdata.com:8080/solr4/select?fq=database:6265/'
 >PLOS ONE articles will appear here</div>
        </td>
        <td style="background: #e0f8f0">
@@ -46,7 +46,7 @@
 <div class='mkwsRecords mkwsTeam_gutenberg'
        autosearch='dinosaur'
        sort='relevance'
-       targets='pz:id~lui.indexdata.com:8080/solr4/select?fq=database:3552'
+       targets='pz:id=lui.indexdata.com:8080/solr4/select?fq=database:3552/'
 >Free e-books will appear here</div>
        </td>
        <td style="background: #e0f0f8">
@@ -54,7 +54,7 @@
 <div class='mkwsRecords mkwsTeam_blog'
        autosearch='dinosaur'
        sort='relevance'
-       targets='pz:id~lui.indexdata.com:8080/solr4/select?fq=database:5802'
+       targets='pz:id=lui.indexdata.com:8080/solr4/select?fq=database:5802/'
 >Library catalog entries will appear here</div>
        </td>
       </tr>