normalizing finally seems to converge
authorHeikki Levanto <heikki@indexdata.dk>
Wed, 18 Dec 2013 13:17:53 +0000 (14:17 +0100)
committerHeikki Levanto <heikki@indexdata.dk>
Wed, 18 Dec 2013 13:17:53 +0000 (14:17 +0100)
src/relevance.c
test/test_rank.urls
test/test_rank_12.res
test/test_rank_settings_4.xml [new file with mode: 0644]

index 4282d8c..4cbf7f2 100644 (file)
@@ -189,13 +189,15 @@ static double squaresum( struct norm_record *rp, double a, double b)
 // For each client, normalize scores
 static void normalize_scores(struct relevance *rel)
 {
-    const int maxiterations = 100;
-    const double enough = 100.0;  // sets the number of decimals we are happy with
+    const int maxiterations = 1000;
+    const double enough = 1000.0;  // sets the number of decimals we are happy with
+    const double stepchange = 0.5; // reduction of the step size when finding middle
+      // 0.5 sems to be magical, much better than 0.4 or 0.6
     struct norm_client *norm;
     for ( norm = rel->norm; norm; norm = norm->next )
     {
-        yaz_log(YLOG_LOG,"Normalizing client %d: scorefield=%d count=%d",
-                norm->num, norm->scorefield, norm->count);
+        yaz_log(YLOG_LOG,"Normalizing client %d: scorefield=%d count=%d range=%f %f",
+                norm->num, norm->scorefield, norm->count, norm->min, norm->max);
         norm->a = 1.0; // default normalizing factors, no change
         norm->b = 0.0;
         if ( norm->scorefield != scorefield_none &&
@@ -206,7 +208,7 @@ static void normalize_scores(struct relevance *rel)
             double a,b;  // params to optimize
             double as,bs; // step sizes
             double chi;
-            char dir = 'a';
+            char *branch = "?";
             // initial guesses for the parameters
             if ( range < 1e-6 ) // practically zero
                 range = norm->max;
@@ -221,54 +223,59 @@ static void normalize_scores(struct relevance *rel)
                 double aminus= squaresum(norm->records, a-as, b);
                 double bplus = squaresum(norm->records, a, b+bs);
                 double bminus= squaresum(norm->records, a, b-bs);
+                double prevchi = chi;
                 if ( aplus < chi && aplus < aminus && aplus < bplus && aplus < bminus)
                 {
                     a = a + as;
                     chi = aplus;
-                    yaz_log(YLOG_LOG,"Fitting aplus it=%d: a=%f / %f  b=%f / %f  chi = %f",
-                        it, a, as, b, bs, chi );
+                    as = as * (1.0 + stepchange);
+                    branch = "aplus ";
                 }
                 else if ( aminus < chi && aminus < aplus && aminus < bplus && aminus < bminus)
                 {
                     a = a - as;
                     chi = aminus;
-                    yaz_log(YLOG_LOG,"Fitting aminus it=%d: a=%f / %f  b=%f / %f  chi = %f",
-                        it, a, as, b, bs, chi );
+                    as = as * (1.0 + stepchange);
+                    branch = "aminus";
                 }
                 else if ( bplus < chi && bplus < aplus && bplus < aminus && bplus < bminus)
                 {
                     b = b + bs;
                     chi = bplus;
-                    yaz_log(YLOG_LOG,"Fitting bplus it=%d: a=%f / %f  b=%f / %f  chi = %f",
-                        it, a, as, b, bs, chi );
+                    bs = bs * (1.0 + stepchange);
+                    branch = "bplus ";
                 }
                 else if ( bminus < chi && bminus < aplus && bminus < bplus && bminus < aminus)
                 {
                     b = b - bs;
                     chi = bminus;
-                    yaz_log(YLOG_LOG,"Fitting bminus it=%d: a=%f / %f  b=%f / %f  chi = %f",
-                        it, a, as, b, bs, chi );
+                    branch = "bminus";
+                    bs = bs * (1.0+stepchange);
                 }
                 else
-                {
-                    if ( as > bs )
+                { // a,b is the best so far, adjust one step size
+                  // which one? The one that has the greatest effect to chi
+                  // That is, the average of plus and minus is further away from chi
+                    double adif = 0.5 * ( aplus + aminus ) - prevchi;
+                    double bdif = 0.5 * ( bplus + bminus ) - prevchi;
+                    if ( fabs(adif) > fabs(bdif) )
                     {
-                        as = as / 2;
-                        yaz_log(YLOG_LOG,"Fitting step a it=%d: a=%f / %f  b=%f / %f  chi = %f",
-                            it, a, as, b, bs, chi );
+                        as = as * ( 1.0 - stepchange);
+                        branch = "step a";
                     }
                     else
                     {
-                        bs = bs / 2;
-                        yaz_log(YLOG_LOG,"Fitting step b it=%d: a=%f / %f  b=%f / %f  chi = %f",
-                            it, a, as, b, bs, chi );
+                        bs = bs * ( 1.0 - stepchange);
+                        branch = "step b";
                     }
                 }
+                yaz_log(YLOG_LOG,"Fitting %s it=%d: a=%f %f  b=%f %f  chi=%f ap=%f am=%f, bp=%f bm=%f p=%f",
+                    branch, it, a, as, b, bs, chi,
+                    aplus, aminus, bplus, bminus, prevchi );
                 norm->a = a;
                 norm->b = b;
                 if ( fabs(as) * enough < fabs(a) &&
                      fabs(bs) * enough < fabs(b) ) {
-                    yaz_log(YLOG_LOG,"Fitting done: stopping loop at %d" , it );
                     break;  // not changing much any more
 
                 }
index 4a8ac44..b08b8a0 100644 (file)
@@ -10,3 +10,7 @@ http://localhost:9763/search.pz2?session=1&command=init
 test_rank_settings_3.xml http://localhost:9763/search.pz2?session=1&command=settings
 http://localhost:9763/search.pz2?session=1&command=search&query=water&sort=relevance
 2 http://localhost:9763/search.pz2?session=1&command=show&sort=relevance
+http://localhost:9763/search.pz2?session=1&command=init
+test_rank_settings_4.xml http://localhost:9763/search.pz2?session=1&command=settings
+http://localhost:9763/search.pz2?session=1&command=search&query=water&sort=relevance
+2 http://localhost:9763/search.pz2?session=1&command=show&sort=relevance
index ce588ec..f03b6fc 100644 (file)
 <start>0</start>
 <num>19</num>
 <hit>
- <md-title>District water supply plan</md-title>
+ <md-title>Water management problems and challenges in India</md-title>
+ <md-title-remainder>an analytical review</md-title-remainder>
  <md-date>2000</md-date>
- <md-description>[1] [No special title] -- [2] Appendixes</md-description>
+ <md-author>Dinesh Kumar, M</md-author>
  <md-medium>book</md-medium>
  <location id="LOC Solr Test"
-    name="LOC Solr Test" checksum="552609001">
-  <md-title>District water supply plan</md-title>
+    name="LOC Solr Test" checksum="1554355631">
+  <md-title>Water management problems and challenges in India</md-title>
+  <md-title-remainder>an analytical review</md-title-remainder>
   <md-date>2000</md-date>
-  <md-description>[1] [No special title] -- [2] Appendixes</md-description>
+  <md-author>Dinesh Kumar, M</md-author>
   <md-medium>book</md-medium>
-  <md-score>1.928196</md-score>
+  <md-score>2.304635</md-score>
  </location>
  <count>1</count>
- <relevance>3526</relevance>
- <recid>content: title district water supply plan medium book</recid>
+ <relevance>6645</relevance>
+ <recid>content: title water management problems and challenges in india author dinesh kumar m medium book</recid>
 </hit>
 <hit>
- <md-title>Proposition 13</md-title>
- <md-title-remainder>Safe Drinking Water, Clean Water, Watershed Protection, and Flood Protection Act</md-title-remainder>
+ <md-title>The magic of water</md-title>
+ <md-title-remainder>reflection and transparency at the water&apos;s edge</md-title-remainder>
  <md-date>2000</md-date>
- <md-description>&quot;March 2000.&quot;</md-description>
+ <md-author>Hochschwender, Ted</md-author>
  <md-medium>book</md-medium>
  <location id="LOC Solr Test"
-    name="LOC Solr Test" checksum="3232963828">
-  <md-title>Proposition 13</md-title>
-  <md-title-remainder>Safe Drinking Water, Clean Water, Watershed Protection, and Flood Protection Act</md-title-remainder>
+    name="LOC Solr Test" checksum="3168968100">
+  <md-title>The magic of water</md-title>
+  <md-title-remainder>reflection and transparency at the water&apos;s edge</md-title-remainder>
   <md-date>2000</md-date>
-  <md-description>&quot;March 2000.&quot;</md-description>
-  <md-medium>book</md-medium>
-  <md-score>1.928196</md-score>
- </location>
- <count>1</count>
- <relevance>3526</relevance>
- <recid>content: title proposition medium book</recid>
-</hit>
-<hit>
- <md-title>1999 wastewater and drinking water user charge survey</md-title>
- <md-date>1999</md-date>
- <md-description>&quot;December, 1999.&quot;</md-description>
- <md-medium>book</md-medium>
- <location id="LOC Solr Test"
-    name="LOC Solr Test" checksum="1618351359">
-  <md-title>1999 wastewater and drinking water user charge survey</md-title>
-  <md-date>1999</md-date>
-  <md-description>Cover title</md-description>
-  <md-description>&quot;December, 1999.&quot;</md-description>
-  <md-medium>book</md-medium>
-  <md-score>1.928196</md-score>
- </location>
- <count>1</count>
- <relevance>3526</relevance>
- <recid>content: title wastewater and drinking water user charge survey medium book</recid>
-</hit>
-<hit>
- <md-title>Water in press, 1997</md-title>
- <md-title-remainder>an index of news items on water resources selected from leading news papers</md-title-remainder>
- <md-date>1998</md-date>
- <md-description>With reference to India</md-description>
- <md-medium>book</md-medium>
- <location id="LOC Solr Test"
-    name="LOC Solr Test" checksum="2167221470">
-  <md-title>Water in press, 1997</md-title>
-  <md-title-remainder>an index of news items on water resources selected from leading news papers</md-title-remainder>
-  <md-date>1998</md-date>
-  <md-description>Includes index</md-description>
-  <md-description>With reference to India</md-description>
+  <md-author>Hochschwender, Ted</md-author>
   <md-medium>book</md-medium>
-  <md-score>1.928196</md-score>
+  <md-score>2.231453</md-score>
  </location>
  <count>1</count>
- <relevance>3526</relevance>
- <recid>content: title water in press medium book</recid>
+ <relevance>5215</relevance>
+ <recid>content: title the magic of water author hochschwender ted medium book</recid>
 </hit>
 <hit>
- <md-title>Who governs water?</md-title>
- <md-title-remainder>the politics of water resource management</md-title-remainder>
+ <md-title>Water</md-title>
  <md-date>1999</md-date>
- <md-author>Frey, Hans</md-author>
+ <md-author>De Villiers, Marq</md-author>
  <md-medium>book</md-medium>
  <location id="LOC Solr Test"
-    name="LOC Solr Test" checksum="3738890">
-  <md-title>Who governs water?</md-title>
-  <md-title-remainder>the politics of water resource management</md-title-remainder>
+    name="LOC Solr Test" checksum="488613273">
+  <md-title>Water</md-title>
   <md-date>1999</md-date>
-  <md-author>Frey, Hans</md-author>
+  <md-author>De Villiers, Marq</md-author>
   <md-medium>book</md-medium>
-  <md-score>1.928196</md-score>
+  <md-score>2.186368</md-score>
  </location>
  <count>1</count>
- <relevance>3526</relevance>
- <recid>content: title who governs water author frey hans medium book</recid>
+ <relevance>4334</relevance>
+ <recid>content: title water author de villiers marq medium book</recid>
 </hit>
 <hit>
- <md-title>A Primer on fresh water</md-title>
- <md-title-remainder>questions and answers</md-title-remainder>
+ <md-title>Water use for public water supply in Michigan, 1998</md-title>
  <md-date>2000</md-date>
- <md-description>Issued also in French under title: Notions élémentaires sur l&apos;eau douce : questions et réponses</md-description>
+ <md-description>&quot;January 3, 2000.&quot;</md-description>
  <md-medium>book</md-medium>
  <location id="LOC Solr Test"
-    name="LOC Solr Test" checksum="2684093717">
-  <md-title>A Primer on fresh water</md-title>
-  <md-title-remainder>questions and answers</md-title-remainder>
+    name="LOC Solr Test" checksum="2103225742">
+  <md-title>Water use for public water supply in Michigan, 1998</md-title>
   <md-date>2000</md-date>
-  <md-description>Issued also in French under title: Notions élémentaires sur l&apos;eau douce : questions et réponses</md-description>
-  <md-description>Includes index</md-description>
+  <md-description>&quot;January 3, 2000.&quot;</md-description>
   <md-medium>book</md-medium>
-  <md-score>2.016555</md-score>
+  <md-score>2.186368</md-score>
  </location>
  <count>1</count>
- <relevance>2319</relevance>
- <recid>content: title a primer on fresh water medium book</recid>
+ <relevance>4334</relevance>
+ <recid>content: title water use for public water supply in michigan medium book</recid>
 </hit>
 <hit>
- <md-title>Water quality assessment of the State Water Project, 1996-97</md-title>
- <md-date>1999-2000</md-date>
- <md-description>&quot;September 1999.&quot;</md-description>
+ <md-title>Report to the IUCN on water demand management country study</md-title>
+ <md-title-remainder>Namibia</md-title-remainder>
+ <md-date>1999</md-date>
  <md-medium>book</md-medium>
  <location id="LOC Solr Test"
-    name="LOC Solr Test" checksum="3749836075">
-  <md-title>Water quality assessment of the State Water Project, 1996-97</md-title>
+    name="LOC Solr Test" checksum="3717838211">
+  <md-title>Report to the IUCN on water demand management country study</md-title>
+  <md-title-remainder>Namibia</md-title-remainder>
   <md-date>1999</md-date>
-  <md-description>Cover title</md-description>
-  <md-description>&quot;September 1999.&quot;</md-description>
   <md-medium>book</md-medium>
-  <md-score>2.016555</md-score>
- </location>
- <location id="LOC Solr Test"
-    name="LOC Solr Test" checksum="1069481248">
-  <md-title>Water quality assessment of the State Water Project, 1998-99</md-title>
-  <md-date>2000</md-date>
-  <md-description>Cover title</md-description>
-  <md-description>&quot;July 2000.&quot;</md-description>
-  <md-medium>book</md-medium>
-  <md-score>2.016555</md-score>
- </location>
- <count>2</count>
- <relevance>2319</relevance>
- <recid>content: title water quality assessment of the state water project medium book</recid>
-</hit>
-<hit>
- <md-title>Wonderful water</md-title>
- <md-date>2001</md-date>
- <md-author>Glover, David</md-author>
- <md-medium>book</md-medium>
- <location id="LOC Solr Test"
-    name="LOC Solr Test" checksum="2135223606">
-  <md-title>Wonderful water</md-title>
-  <md-date>2001</md-date>
-  <md-author>Glover, David</md-author>
-  <md-medium>book</md-medium>
-  <md-score>2.037029</md-score>
+  <md-score>2.114981</md-score>
  </location>
  <count>1</count>
- <relevance>2039</relevance>
- <recid>content: title wonderful water author glover david medium book</recid>
+ <relevance>2939</relevance>
+ <recid>content: title report to the iucn on water demand management country study medium book</recid>
 </hit>
 <hit>
  <md-title>Evaluation and control of water pollution in Bhavani Basin</md-title>
   <md-score>2.061328</md-score>
  </location>
  <count>1</count>
- <relevance>1707</relevance>
+ <relevance>1890</relevance>
  <recid>content: title evaluation and control of water pollution in bhavani basin medium book</recid>
 </hit>
 <hit>
   <md-score>2.061328</md-score>
  </location>
  <count>1</count>
- <relevance>1707</relevance>
+ <relevance>1890</relevance>
  <recid>content: title unsia water cluster medium book</recid>
 </hit>
 <hit>
   <md-score>2.061328</md-score>
  </location>
  <count>1</count>
- <relevance>1707</relevance>
+ <relevance>1890</relevance>
  <recid>content: title water and water supplies author thresh john clough medium book</recid>
 </hit>
 <hit>
   <md-score>2.061328</md-score>
  </location>
  <count>1</count>
- <relevance>1707</relevance>
+ <relevance>1890</relevance>
  <recid>content: title water author majeed abdul medium book</recid>
 </hit>
 <hit>
   <md-score>2.061328</md-score>
  </location>
  <count>1</count>
- <relevance>1707</relevance>
+ <relevance>1890</relevance>
  <recid>content: title water law author fisher d e medium book</recid>
 </hit>
 <hit>
   <md-score>2.061328</md-score>
  </location>
  <count>1</count>
- <relevance>1707</relevance>
+ <relevance>1890</relevance>
  <recid>content: title water technology management medium book</recid>
 </hit>
 <hit>
- <md-title>Report to the IUCN on water demand management country study</md-title>
- <md-title-remainder>Namibia</md-title-remainder>
- <md-date>1999</md-date>
+ <md-title>Wonderful water</md-title>
+ <md-date>2001</md-date>
+ <md-author>Glover, David</md-author>
  <md-medium>book</md-medium>
  <location id="LOC Solr Test"
-    name="LOC Solr Test" checksum="3717838211">
-  <md-title>Report to the IUCN on water demand management country study</md-title>
-  <md-title-remainder>Namibia</md-title-remainder>
-  <md-date>1999</md-date>
+    name="LOC Solr Test" checksum="2135223606">
+  <md-title>Wonderful water</md-title>
+  <md-date>2001</md-date>
+  <md-author>Glover, David</md-author>
   <md-medium>book</md-medium>
-  <md-score>2.114981</md-score>
+  <md-score>2.037029</md-score>
  </location>
  <count>1</count>
- <relevance>974</relevance>
- <recid>content: title report to the iucn on water demand management country study medium book</recid>
+ <relevance>1415</relevance>
+ <recid>content: title wonderful water author glover david medium book</recid>
 </hit>
 <hit>
- <md-title>Water</md-title>
- <md-date>1999</md-date>
- <md-author>De Villiers, Marq</md-author>
+ <md-title>A Primer on fresh water</md-title>
+ <md-title-remainder>questions and answers</md-title-remainder>
+ <md-date>2000</md-date>
+ <md-description>Issued also in French under title: Notions élémentaires sur l&apos;eau douce : questions et réponses</md-description>
  <md-medium>book</md-medium>
  <location id="LOC Solr Test"
-    name="LOC Solr Test" checksum="488613273">
-  <md-title>Water</md-title>
-  <md-date>1999</md-date>
-  <md-author>De Villiers, Marq</md-author>
+    name="LOC Solr Test" checksum="2684093717">
+  <md-title>A Primer on fresh water</md-title>
+  <md-title-remainder>questions and answers</md-title-remainder>
+  <md-date>2000</md-date>
+  <md-description>Issued also in French under title: Notions élémentaires sur l&apos;eau douce : questions et réponses</md-description>
+  <md-description>Includes index</md-description>
   <md-medium>book</md-medium>
-  <md-score>2.186368</md-score>
+  <md-score>2.016555</md-score>
  </location>
  <count>1</count>
- <relevance>0</relevance>
- <recid>content: title water author de villiers marq medium book</recid>
+ <relevance>1015</relevance>
+ <recid>content: title a primer on fresh water medium book</recid>
 </hit>
 <hit>
- <md-title>Water use for public water supply in Michigan, 1998</md-title>
- <md-date>2000</md-date>
- <md-description>&quot;January 3, 2000.&quot;</md-description>
+ <md-title>Water quality assessment of the State Water Project, 1996-97</md-title>
+ <md-date>1999-2000</md-date>
+ <md-description>&quot;September 1999.&quot;</md-description>
  <md-medium>book</md-medium>
  <location id="LOC Solr Test"
-    name="LOC Solr Test" checksum="2103225742">
-  <md-title>Water use for public water supply in Michigan, 1998</md-title>
+    name="LOC Solr Test" checksum="3749836075">
+  <md-title>Water quality assessment of the State Water Project, 1996-97</md-title>
+  <md-date>1999</md-date>
+  <md-description>Cover title</md-description>
+  <md-description>&quot;September 1999.&quot;</md-description>
+  <md-medium>book</md-medium>
+  <md-score>2.016555</md-score>
+ </location>
+ <location id="LOC Solr Test"
+    name="LOC Solr Test" checksum="1069481248">
+  <md-title>Water quality assessment of the State Water Project, 1998-99</md-title>
   <md-date>2000</md-date>
-  <md-description>&quot;January 3, 2000.&quot;</md-description>
+  <md-description>Cover title</md-description>
+  <md-description>&quot;July 2000.&quot;</md-description>
   <md-medium>book</md-medium>
-  <md-score>2.186368</md-score>
+  <md-score>2.016555</md-score>
  </location>
- <count>1</count>
- <relevance>0</relevance>
- <recid>content: title water use for public water supply in michigan medium book</recid>
+ <count>2</count>
+ <relevance>1015</relevance>
+ <recid>content: title water quality assessment of the state water project medium book</recid>
 </hit>
 <hit>
- <md-title>The magic of water</md-title>
- <md-title-remainder>reflection and transparency at the water&apos;s edge</md-title-remainder>
+ <md-title>District water supply plan</md-title>
  <md-date>2000</md-date>
- <md-author>Hochschwender, Ted</md-author>
+ <md-description>[1] [No special title] -- [2] Appendixes</md-description>
  <md-medium>book</md-medium>
  <location id="LOC Solr Test"
-    name="LOC Solr Test" checksum="3168968100">
-  <md-title>The magic of water</md-title>
-  <md-title-remainder>reflection and transparency at the water&apos;s edge</md-title-remainder>
+    name="LOC Solr Test" checksum="552609001">
+  <md-title>District water supply plan</md-title>
   <md-date>2000</md-date>
-  <md-author>Hochschwender, Ted</md-author>
+  <md-description>[1] [No special title] -- [2] Appendixes</md-description>
   <md-medium>book</md-medium>
-  <md-score>2.231453</md-score>
+  <md-score>1.928196</md-score>
  </location>
  <count>1</count>
- <relevance>-616</relevance>
- <recid>content: title the magic of water author hochschwender ted medium book</recid>
+ <relevance>-710</relevance>
+ <recid>content: title district water supply plan medium book</recid>
 </hit>
 <hit>
- <md-title>Water management problems and challenges in India</md-title>
- <md-title-remainder>an analytical review</md-title-remainder>
+ <md-title>Proposition 13</md-title>
+ <md-title-remainder>Safe Drinking Water, Clean Water, Watershed Protection, and Flood Protection Act</md-title-remainder>
  <md-date>2000</md-date>
- <md-author>Dinesh Kumar, M</md-author>
+ <md-description>&quot;March 2000.&quot;</md-description>
  <md-medium>book</md-medium>
  <location id="LOC Solr Test"
-    name="LOC Solr Test" checksum="1554355631">
-  <md-title>Water management problems and challenges in India</md-title>
-  <md-title-remainder>an analytical review</md-title-remainder>
+    name="LOC Solr Test" checksum="3232963828">
+  <md-title>Proposition 13</md-title>
+  <md-title-remainder>Safe Drinking Water, Clean Water, Watershed Protection, and Flood Protection Act</md-title-remainder>
   <md-date>2000</md-date>
-  <md-author>Dinesh Kumar, M</md-author>
+  <md-description>&quot;March 2000.&quot;</md-description>
   <md-medium>book</md-medium>
-  <md-score>2.304635</md-score>
+  <md-score>1.928196</md-score>
  </location>
  <count>1</count>
- <relevance>-1616</relevance>
- <recid>content: title water management problems and challenges in india author dinesh kumar m medium book</recid>
+ <relevance>-710</relevance>
+ <recid>content: title proposition medium book</recid>
+</hit>
+<hit>
+ <md-title>1999 wastewater and drinking water user charge survey</md-title>
+ <md-date>1999</md-date>
+ <md-description>&quot;December, 1999.&quot;</md-description>
+ <md-medium>book</md-medium>
+ <location id="LOC Solr Test"
+    name="LOC Solr Test" checksum="1618351359">
+  <md-title>1999 wastewater and drinking water user charge survey</md-title>
+  <md-date>1999</md-date>
+  <md-description>Cover title</md-description>
+  <md-description>&quot;December, 1999.&quot;</md-description>
+  <md-medium>book</md-medium>
+  <md-score>1.928196</md-score>
+ </location>
+ <count>1</count>
+ <relevance>-710</relevance>
+ <recid>content: title wastewater and drinking water user charge survey medium book</recid>
+</hit>
+<hit>
+ <md-title>Water in press, 1997</md-title>
+ <md-title-remainder>an index of news items on water resources selected from leading news papers</md-title-remainder>
+ <md-date>1998</md-date>
+ <md-description>With reference to India</md-description>
+ <md-medium>book</md-medium>
+ <location id="LOC Solr Test"
+    name="LOC Solr Test" checksum="2167221470">
+  <md-title>Water in press, 1997</md-title>
+  <md-title-remainder>an index of news items on water resources selected from leading news papers</md-title-remainder>
+  <md-date>1998</md-date>
+  <md-description>Includes index</md-description>
+  <md-description>With reference to India</md-description>
+  <md-medium>book</md-medium>
+  <md-score>1.928196</md-score>
+ </location>
+ <count>1</count>
+ <relevance>-710</relevance>
+ <recid>content: title water in press medium book</recid>
+</hit>
+<hit>
+ <md-title>Who governs water?</md-title>
+ <md-title-remainder>the politics of water resource management</md-title-remainder>
+ <md-date>1999</md-date>
+ <md-author>Frey, Hans</md-author>
+ <md-medium>book</md-medium>
+ <location id="LOC Solr Test"
+    name="LOC Solr Test" checksum="3738890">
+  <md-title>Who governs water?</md-title>
+  <md-title-remainder>the politics of water resource management</md-title-remainder>
+  <md-date>1999</md-date>
+  <md-author>Frey, Hans</md-author>
+  <md-medium>book</md-medium>
+  <md-score>1.928196</md-score>
+ </location>
+ <count>1</count>
+ <relevance>-710</relevance>
+ <recid>content: title who governs water author frey hans medium book</recid>
 </hit>
 </show>
\ No newline at end of file
diff --git a/test/test_rank_settings_4.xml b/test/test_rank_settings_4.xml
new file mode 100644 (file)
index 0000000..edd80df
--- /dev/null
@@ -0,0 +1,33 @@
+<!-- Solr target -->
+<settings target="LOC Solr Test">
+  <set name="pz:name"  value="LOC Solr Test" />
+  <set name="pz:url"   value="ocs-test.indexdata.com/solr/select" />
+
+  <set name="pz:native_score"  value="internal" />
+  
+  <set name="full_text_target"  value="=NO" />
+  <set name="use_url_proxy"  value="0" />
+  <set name="pz:piggyback"   value="1" />
+  <set name="pz:preferred"   value="1" />
+  <set name="pz:block_timeout"  value="2" />
+
+  <set name="pz:cclmap:term"  value="1=text s=Dal" />
+  <set name="pz:cclmap:au"    value="1=author"   />
+  <set name="pz:cclmap:su"    value="1=subject"  />
+  <set name="pz:cclmap:date"  value="1=date" />
+  <set name="pz:cclmap:ti"  value="1=title" />
+  <set name="pz:cclmap:isbn"  value="1=isbn" />
+  <set name="pz:cclmap:author_phrase" value="1=author_exact 6=3"/>
+  <set name="pz:sru"         value="solr"  />
+  <set name="pz:xslt"  value="solr-pz2.xsl" />
+  <set name="use_thumbnails" value="0" />
+  <set name="pz:queryencoding"  value="UTF-8" />
+  <set name="pz:extra_args"  value="fl=*,score" />
+  <set name="pz:termlist_term_count" value="10"/>
+  <set name="pz:facetmap:author"  value="author_exact"  />
+  <set name="pz:facetmap:subject" value="subject_exact" />
+  <set name="pz:facetmap:medium"  value="medium_exact"  />
+  <set name="pz:facetmap:date"  value="date" />
+  <set name="pz:maxrecs" value="20" />
+  <set name="pz:present_chunk" value="0"/>
+</settings>