Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/pazpar2
authorNiels Erik G. Nielsen <nielserik@indexdata.com>
Tue, 15 Feb 2011 21:22:23 +0000 (22:22 +0100)
committerNiels Erik G. Nielsen <nielserik@indexdata.com>
Tue, 15 Feb 2011 21:22:23 +0000 (22:22 +0100)
22 files changed:
jinx-it.sh [new file with mode: 0644]
src/client.c
src/session.c
test/gils_service.xml
test/test_facets.urls
test/test_facets_10.res
test/test_facets_11.res
test/test_facets_13.res
test/test_facets_14.res
test/test_facets_16.res
test/test_facets_17.res
test/test_facets_18.res
test/test_facets_19.res
test/test_facets_24.res
test/test_facets_6.res
test/test_facets_9.res
test/test_http_28.res
test/test_solr.urls
test/test_solr_12.res [new file with mode: 0644]
test/test_solr_13.res [new file with mode: 0644]
test/test_solr_14.res [new file with mode: 0644]
test/test_solr_15.res [new file with mode: 0644]

diff --git a/jinx-it.sh b/jinx-it.sh
new file mode 100644 (file)
index 0000000..a3f2e7d
--- /dev/null
@@ -0,0 +1,8 @@
+if [ "$1" == "" ] ; then 
+    COUNT=10
+else
+    COUNT=$1
+fi
+for d in `seq $COUNT` ; do 
+    jinx run src/pazpar2 -X -f ~/etc/pazpar2/server-threaded.xml -l pazpar2.log -v all
+done 
\ No newline at end of file
index e7bb2a0..61e0a8a 100644 (file)
@@ -103,6 +103,8 @@ struct client {
     ZOOM_resultset resultset;
     YAZ_MUTEX mutex;
     int ref_count;
+    /* copy of database->url */
+    char *url;
 };
 
 struct show_raw {
@@ -592,7 +594,10 @@ static int client_set_facets_request(struct client *cl, ZOOM_connection link)
     struct session_database *sdb = client_get_database(cl);
     const char *opt_facet_term_sort  = session_setting_oneval(sdb, PZ_TERMLIST_TERM_SORT);
     const char *opt_facet_term_count = session_setting_oneval(sdb, PZ_TERMLIST_TERM_COUNT);
-    const char *opt_facet_record_filter = session_setting_oneval(sdb, PZ_RECORDFILTER);
+
+    /* Future record filtering on target */
+    /* const char *opt_facet_record_filter = session_setting_oneval(sdb, PZ_RECORDFILTER); */
+
     /* Disable when no count is set */
     /* TODO Verify: Do we need to reset the  ZOOM facets if a ZOOM Connection is being reused??? */
     if (opt_facet_term_count && *opt_facet_term_count)
@@ -687,18 +692,19 @@ void client_start_search(struct client *cl)
     if (*opt_requestsyn)
         ZOOM_connection_option_set(link, "preferredRecordSyntax", opt_requestsyn);
 
-    if (!*opt_maxrecs)
+    if (opt_maxrecs && *opt_maxrecs)
     {
-        sprintf(maxrecs_str, "%d", cl->maxrecs);
-        opt_maxrecs = maxrecs_str;
+        cl->maxrecs = atoi(opt_maxrecs);
     }
-    ZOOM_connection_option_set(link, "count", opt_maxrecs);
 
+    /* convert back to string representation used in ZOOM API */
+    sprintf(maxrecs_str, "%d", cl->maxrecs);
+    ZOOM_connection_option_set(link, "count", maxrecs_str);
 
-    if (atoi(opt_maxrecs) > 20)
+    if (cl->maxrecs > 20)
         ZOOM_connection_option_set(link, "presentChunk", "20");
     else
-        ZOOM_connection_option_set(link, "presentChunk", opt_maxrecs);
+        ZOOM_connection_option_set(link, "presentChunk", maxrecs_str);
 
     sprintf(startrecs_str, "%d", cl->startrecs);
     ZOOM_connection_option_set(link, "start", startrecs_str);
@@ -750,6 +756,7 @@ struct client *client_create(void)
     pazpar2_mutex_create(&cl->mutex, "client");
     cl->preferred = 0;
     cl->ref_count = 1;
+    cl->url = 0;
     client_use(1);
     
     return cl;
@@ -784,6 +791,7 @@ int client_destroy(struct client *c)
             c->pquery = 0;
             xfree(c->cqlquery);
             c->cqlquery = 0;
+            xfree(c->url);
             assert(!c->connection);
 
             if (c->resultset)
@@ -1045,6 +1053,10 @@ int client_get_diagnostic(struct client *cl)
 void client_set_database(struct client *cl, struct session_database *db)
 {
     cl->database = db;
+    /* Copy the URL for safe logging even after session is gone */
+    if (db) {
+        cl->url = xstrdup(db->database->url);
+    }
 }
 
 struct host *client_get_host(struct client *cl)
@@ -1054,9 +1066,10 @@ struct host *client_get_host(struct client *cl)
 
 const char *client_get_url(struct client *cl)
 {
-    if (cl->database)
-        return client_get_database(cl)->database->url;
+    if (cl->url)
+        return cl->url;
     else
+        /* This must not happen anymore, as the url is present until destruction of client  */
         return "NOURL";
 }
 
index 04807a8..1c95feb 100644 (file)
@@ -190,7 +190,7 @@ void add_facet(struct session *s, const char *type, const char *value, int count
             s->num_termlists = i + 1;
         }
         
-        session_log(s, YLOG_DEBUG, "Session: facets for %s: %s norm:%s (%d)",
+        session_log(s, YLOG_DEBUG, "Facets for %s: %s norm:%s (%d)",
                     type, value, wrbuf_cstr(facet_wrbuf), count);
         termlist_insert(s->termlists[i].termlist, wrbuf_cstr(facet_wrbuf),
                         count);
@@ -476,7 +476,7 @@ void session_alert_watch(struct session *s, int what)
 
         session_leave(s);
         session_log(s, YLOG_DEBUG,
-                    "session_alert_watch: %d calling function: %p", what, fun);
+                    "Alert Watch: %d calling function: %p", what, fun);
         fun(data);
     }
     else
@@ -492,6 +492,7 @@ static void select_targets_callback(void *context, struct session_database *db)
     client_set_database(cl, db);
 
     client_set_session(cl, se);
+
     l = xmalloc(sizeof(*l));
     l->client = cl;
     l->next = se->clients;
@@ -548,7 +549,7 @@ int session_is_preferred_clients_ready(struct session *s)
     for (l = s->clients; l; l = l->next)
         if (client_is_active_preferred(l->client))
             res++;
-    session_log(s, YLOG_DEBUG, "Session has %d active preferred clients.", res);
+    session_log(s, YLOG_DEBUG, "Has %d active preferred clients.", res);
     return res == 0;
 }
 
@@ -726,7 +727,7 @@ void destroy_session(struct session *se)
 {
     struct session_database *sdb;
 
-    session_log(se, YLOG_DEBUG, "Pazpar2 session destroy");
+    session_log(se, YLOG_DEBUG, "Destroying");
     session_remove_clients(se);
 
     for (sdb = se->databases; sdb; sdb = sdb->next)
@@ -751,7 +752,7 @@ struct session *new_session(NMEM nmem, struct conf_service *service,
     sprintf(tmp_str, "session#%u", session_id);
 
     session->session_id = session_id;
-    session_log(session, YLOG_DEBUG, "New session");
+    session_log(session, YLOG_DEBUG, "New");
     session->service = service;
     session->relevance = 0;
     session->total_hits = 0;
@@ -1271,8 +1272,8 @@ static int ingest_to_cluster(struct client *cl,
                                                     &se->total_merged);
 
     const char *use_term_factor_str = session_setting_oneval(sdb, PZ_TERMLIST_TERM_FACTOR);
+    // TODO: Work-around to default to use term factor, until other MK2 components supports it
     int use_term_factor = 1;
-    // HACK: default to use term factor.
     int term_factor = 1; 
     if (use_term_factor_str && use_term_factor_str[0] != 0)
        use_term_factor =  atoi(use_term_factor_str);
@@ -1281,7 +1282,7 @@ static int ingest_to_cluster(struct client *cl,
         int hits = (int) client_get_hits(cl);
         term_factor = MAX(hits, maxrecs) /  MAX(1, maxrecs);
         assert(term_factor >= 1);
-        yaz_log(YLOG_DEBUG, "Using term factor %d ", term_factor); 
+        yaz_log(YLOG_DEBUG, "Using term factor: %d (%d / %d)", term_factor, MAX(hits, maxrecs), MAX(1, maxrecs));
     }
 
     if (!cluster)
@@ -1496,7 +1497,7 @@ void session_log(struct session *s, int level, const char *fmt, ...)
     va_start(ap, fmt);
 
     yaz_vsnprintf(buf, sizeof(buf)-30, fmt, ap);
-    yaz_log(level, "%u %s", s->session_id, buf);
+    yaz_log(level, "Session (%u): %s", s->session_id, buf);
 
     va_end(ap);
 }
index 8a43910..71b4d16 100644 (file)
@@ -19,9 +19,9 @@
        <!-- Result normalization settings -->
        <set name="pz:nativesyntax" value="iso2709"/>
        <set name="pz:xslt" value="marc21_test.xsl"/>
-       
        <set name="pz:apdulog" value="1"/>
-       
+
+       <set name="pz:maxrecs" value="3" />
       </settings>
 
       <metadata name="url" merge="unique"/>
index 42fda58..91a0f44 100644 (file)
@@ -3,22 +3,22 @@ http://localhost:9763/search.pz2?session=1&command=settings&pz:name%5Blocalhost:
 http://localhost:9763/search.pz2?session=1&command=search&query=7+and+computer
 http://localhost:9763/search.pz2?session=1&command=show&block=1
 http://localhost:9763/search.pz2?session=1&command=bytarget
-http://localhost:9763/search.pz2?session=1&command=termlist&name=xtargets%2Cauthor%2Csubject%2Cdate
-http://localhost:9763/search.pz2?session=1&command=settings&pz:name%5Blocalhost:9999%2Fdb1%5D=db1&pz:requestsyntax%5Blocalhost:9999%2Fdb1%5D=usmarc&pz:nativesyntax%5Blocalhost:9999%2Fdb1%5D=txml&pz:xslt%5Blocalhost:9999%2Fdb1%5D=tmarc.xsl&pz:termlist_term_count%5Blocalhost:9999%2Fdb1%5D=5
+4 http://localhost:9763/search.pz2?session=1&command=termlist&name=xtargets%2Cauthor%2Csubject%2Cdate%2Cmedium
+http://localhost:9763/search.pz2?session=1&command=settings&pz:name%5Blocalhost:9999%2Fdb1%5D=db1&pz:requestsyntax%5Blocalhost:9999%2Fdb1%5D=usmarc&pz:nativesyntax%5Blocalhost:9999%2Fdb1%5D=txml&pz:xslt%5Blocalhost:9999%2Fdb1%5D=tmarc.xsl&pz:termlist_term_count%5Blocalhost:9999%2Fdb1%5D=5&pz:maxrecs%5Blocalhost:9999%2Fdb1%5D=2
 http://localhost:9763/search.pz2?session=1&command=search&query=4+and+computer
 http://localhost:9763/search.pz2?session=1&command=show&block=1
 http://localhost:9763/search.pz2?session=1&command=bytarget
-http://localhost:9763/search.pz2?session=1&command=termlist&name=xtargets%2Cauthor%2Csubject%2Cdate
+http://localhost:9763/search.pz2?session=1&command=termlist&name=xtargets%2Cauthor%2Csubject%2Cdate%2Cmedium
 http://localhost:9763/search.pz2?session=1&command=search&query=8+and+computer
 http://localhost:9763/search.pz2?session=1&command=show&block=1
-http://localhost:9763/search.pz2?session=1&command=termlist&name=xtargets%2Cauthor%2Csubject%2Cdate
+http://localhost:9763/search.pz2?session=1&command=termlist&name=xtargets%2Cauthor%2Csubject%2Cdate%2Cmedium
 http://localhost:9763/search.pz2?session=1&command=search&query=6+and+computer
 http://localhost:9763/search.pz2?session=1&command=show
-http://localhost:9763/search.pz2?session=1&command=termlist&name=xtargets%2Cauthor%2Csubject%2Cdate
-10 http://localhost:9763/search.pz2?session=1&command=termlist&name=xtargets%2Cauthor%2Csubject%2Cdate
+http://localhost:9763/search.pz2?session=1&command=termlist&name=xtargets%2Cauthor%2Csubject%2Cdate%2Cmedium
+10 http://localhost:9763/search.pz2?session=1&command=termlist&name=xtargets%2Cauthor%2Csubject%2Cdate%2Cmedium
 http://localhost:9763/search.pz2?session=1&command=bytarget
 http://localhost:9763/search.pz2?command=init
 http://localhost:9763/search.pz2?session=2&command=settings&pz:name%5Blocalhost:9999%2Fdb1%5D=db1&pz:requestsyntax%5Blocalhost:9999%2Fdb1%5D=usmarc&pz:nativesyntax%5Blocalhost:9999%2Fdb1%5D=txml&pz:xslt%5Blocalhost:9999%2Fdb1%5D=tmarc.xsl&pz:apdulog%5Blocalhost:9999%2Fdb1%5D=1
 http://localhost:9763/search.pz2?session=2&command=search&query=9+and+computer
 2 http://localhost:9763/search.pz2?session=2&command=show&block=1
-http://localhost:9763/search.pz2?session=2&command=termlist&name=xtargets%2Cauthor%2Csubject%2Cdate
+http://localhost:9763/search.pz2?session=2&command=termlist&name=xtargets%2Cauthor%2Csubject%2Cdate%2Cmedium
index d3bc225..44f1bb9 100644 (file)
@@ -4,6 +4,6 @@
 <name>db1</name>
 <hits>4</hits>
 <diagnostic>0</diagnostic>
-<records>4</records>
+<records>2</records>
 <state>Client_Idle</state>
 </target></bytarget>
\ No newline at end of file
index 9e6777e..64048ad 100644 (file)
@@ -30,4 +30,6 @@
 <term><name>date3</name><frequency>70</frequency></term>
 <term><name>date4</name><frequency>60</frequency></term>
 </list>
+<list name="medium">
+</list>
 </termlist>
index 06e9e2f..f3c7728 100644 (file)
@@ -2,10 +2,10 @@
 <show>
 <status>OK</status>
 <activeclients>0</activeclients>
-<merged>7</merged>
+<merged>1</merged>
 <total>8</total>
 <start>0</start>
-<num>7</num>
+<num>1</num>
 <hit>
 
 <md-title>How to program a computer</md-title>
 <md-title>How to program a computer</md-title>
 <md-author>Jack Collins</md-author></location>
 <count>2</count>
-<relevance>32047</relevance>
+<relevance>240000</relevance>
 <recid>title how to program a computer author jack collins</recid>
 </hit>
-<hit>
-
-<md-title>Computer science &amp; technology</md-title>
-<md-title-remainder>proceedings of a workshop held at the National Bureau of Standards, Gaithersburg, MD, June 3-4, 1976</md-title-remainder>
-<md-date>1977</md-date><location id="localhost:9999/db1" name="db1">
-<md-title>Computer science &amp; technology</md-title>
-<md-title-remainder>proceedings of a workshop held at the National Bureau of Standards, Gaithersburg, MD, June 3-4, 1976</md-title-remainder>
-<md-date>1977</md-date></location>
-<relevance>26706</relevance>
-<recid>title computer science technology</recid>
-</hit>
-<hit>
-
-<md-title>The Computer Bible</md-title>
-<md-date>1973-1980</md-date>
-<md-description>Vols. 2, 8: Missoula, Mont. : Published by Scholars Press for Biblical Research Associates</md-description><location id="localhost:9999/db1" name="db1">
-<md-title>The Computer Bible</md-title>
-<md-date>1973-1980</md-date>
-<md-description>Hebrew and Greek; introductions in English</md-description>
-<md-description>Vols. 2, 8: Missoula, Mont. : Published by Scholars Press for Biblical Research Associates</md-description></location>
-<relevance>26706</relevance>
-<recid>title the computer bible</recid>
-</hit>
-<hit>
-
-<md-title>The Puget Sound Region</md-title>
-<md-title-remainder>a portfolio of thematic computer maps</md-title-remainder>
-<md-date>1974</md-date>
-<md-author>Mairs, John W</md-author>
-<md-description>Scale of maps ca. 1:1,000,000</md-description><location id="localhost:9999/db1" name="db1">
-<md-title>The Puget Sound Region</md-title>
-<md-title-remainder>a portfolio of thematic computer maps</md-title-remainder>
-<md-date>1974</md-date>
-<md-author>Mairs, John W</md-author>
-<md-description>Scale of maps ca. 1:1,000,000</md-description></location>
-<relevance>11127</relevance>
-<recid>title the puget sound region author mairs john w</recid>
-</hit>
-<hit>
-
-<md-title>Computer processing of dynamic images from an Anger scintillation camera</md-title>
-<md-title-remainder>the proceedings of a workshop</md-title-remainder>
-<md-date>1974</md-date><location id="localhost:9999/db1" name="db1">
-<md-title>Computer processing of dynamic images from an Anger scintillation camera</md-title>
-<md-title-remainder>the proceedings of a workshop</md-title-remainder>
-<md-date>1974</md-date></location>
-<relevance>8011</relevance>
-<recid>title computer processing of dynamic images from an anger scintillation camera</recid>
-</hit>
-<hit>
-
-<md-title>The use of passwords for controlled access to computer resources</md-title>
-<md-date>1977</md-date>
-<md-author>Wood, Helen M</md-author><location id="localhost:9999/db1" name="db1">
-<md-title>The use of passwords for controlled access to computer resources</md-title>
-<md-date>1977</md-date>
-<md-author>Wood, Helen M</md-author></location>
-<relevance>8011</relevance>
-<recid>title the use of passwords for controlled access to computer resources author wood helen m</recid>
-</hit>
-<hit>
-
-<md-title>Reconstruction tomography in diagnostic radiology and nuclear medicine</md-title>
-<md-title-remainder>proceedings of the workshop</md-title-remainder>
-<md-date>1977</md-date><location id="localhost:9999/db1" name="db1">
-<md-title>Reconstruction tomography in diagnostic radiology and nuclear medicine</md-title>
-<md-title-remainder>proceedings of the workshop</md-title-remainder>
-<md-date>1977</md-date></location>
-<relevance>0</relevance>
-<recid>title reconstruction tomography in diagnostic radiology and nuclear medicine</recid>
-</hit>
 </show>
index e9c2c76..0cf8475 100644 (file)
@@ -30,4 +30,6 @@
 <term><name>date3</name><frequency>70</frequency></term>
 <term><name>date4</name><frequency>60</frequency></term>
 </list>
+<list name="medium">
+</list>
 </termlist>
index 62a2fef..95f4261 100644 (file)
@@ -2,10 +2,10 @@
 <show>
 <status>OK</status>
 <activeclients>0</activeclients>
-<merged>5</merged>
+<merged>1</merged>
 <total>6</total>
 <start>0</start>
-<num>5</num>
+<num>1</num>
 <hit>
 
 <md-title>How to program a computer</md-title>
 <md-title>How to program a computer</md-title>
 <md-author>Jack Collins</md-author></location>
 <count>2</count>
-<relevance>43757</relevance>
+<relevance>240000</relevance>
 <recid>title how to program a computer author jack collins</recid>
 </hit>
-<hit>
-
-<md-title>The Computer Bible</md-title>
-<md-date>1973-1980</md-date>
-<md-description>Vols. 2, 8: Missoula, Mont. : Published by Scholars Press for Biblical Research Associates</md-description><location id="localhost:9999/db1" name="db1">
-<md-title>The Computer Bible</md-title>
-<md-date>1973-1980</md-date>
-<md-description>Hebrew and Greek; introductions in English</md-description>
-<md-description>Vols. 2, 8: Missoula, Mont. : Published by Scholars Press for Biblical Research Associates</md-description></location>
-<relevance>36464</relevance>
-<recid>title the computer bible</recid>
-</hit>
-<hit>
-
-<md-title>The Puget Sound Region</md-title>
-<md-title-remainder>a portfolio of thematic computer maps</md-title-remainder>
-<md-date>1974</md-date>
-<md-author>Mairs, John W</md-author>
-<md-description>Scale of maps ca. 1:1,000,000</md-description><location id="localhost:9999/db1" name="db1">
-<md-title>The Puget Sound Region</md-title>
-<md-title-remainder>a portfolio of thematic computer maps</md-title-remainder>
-<md-date>1974</md-date>
-<md-author>Mairs, John W</md-author>
-<md-description>Scale of maps ca. 1:1,000,000</md-description></location>
-<relevance>15193</relevance>
-<recid>title the puget sound region author mairs john w</recid>
-</hit>
-<hit>
-
-<md-title>Computer processing of dynamic images from an Anger scintillation camera</md-title>
-<md-title-remainder>the proceedings of a workshop</md-title-remainder>
-<md-date>1974</md-date><location id="localhost:9999/db1" name="db1">
-<md-title>Computer processing of dynamic images from an Anger scintillation camera</md-title>
-<md-title-remainder>the proceedings of a workshop</md-title-remainder>
-<md-date>1974</md-date></location>
-<relevance>10939</relevance>
-<recid>title computer processing of dynamic images from an anger scintillation camera</recid>
-</hit>
-<hit>
-
-<md-title>Reconstruction tomography in diagnostic radiology and nuclear medicine</md-title>
-<md-title-remainder>proceedings of the workshop</md-title-remainder>
-<md-date>1977</md-date><location id="localhost:9999/db1" name="db1">
-<md-title>Reconstruction tomography in diagnostic radiology and nuclear medicine</md-title>
-<md-title-remainder>proceedings of the workshop</md-title-remainder>
-<md-date>1977</md-date></location>
-<relevance>0</relevance>
-<recid>title reconstruction tomography in diagnostic radiology and nuclear medicine</recid>
-</hit>
 </show>
index 323421a..e988091 100644 (file)
@@ -30,4 +30,6 @@
 <term><name>date3</name><frequency>70</frequency></term>
 <term><name>date4</name><frequency>60</frequency></term>
 </list>
+<list name="medium">
+</list>
 </termlist>
index 323421a..e988091 100644 (file)
@@ -30,4 +30,6 @@
 <term><name>date3</name><frequency>70</frequency></term>
 <term><name>date4</name><frequency>60</frequency></term>
 </list>
+<list name="medium">
+</list>
 </termlist>
index 45663a9..b91448e 100644 (file)
@@ -4,6 +4,6 @@
 <name>db1</name>
 <hits>6</hits>
 <diagnostic>0</diagnostic>
-<records>6</records>
+<records>2</records>
 <state>Client_Idle</state>
 </target></bytarget>
\ No newline at end of file
index 92496aa..a8f2b85 100644 (file)
@@ -30,4 +30,6 @@
 <term><name>date3</name><frequency>70</frequency></term>
 <term><name>date4</name><frequency>60</frequency></term>
 </list>
+<list name="medium">
+</list>
 </termlist>
index f7e2356..8230a4b 100644 (file)
@@ -30,4 +30,6 @@
 <term><name>1980</name><frequency>1</frequency></term>
 <term><name>1973</name><frequency>1</frequency></term>
 </list>
+<list name="medium">
+</list>
 </termlist>
index 67b2694..1ef9b8e 100644 (file)
@@ -2,10 +2,10 @@
 <show>
 <status>OK</status>
 <activeclients>0</activeclients>
-<merged>3</merged>
+<merged>1</merged>
 <total>4</total>
 <start>0</start>
-<num>3</num>
+<num>1</num>
 <hit>
 
 <md-title>How to program a computer</md-title>
 <relevance>240000</relevance>
 <recid>title how to program a computer author jack collins</recid>
 </hit>
-<hit>
-
-<md-title>The Computer Bible</md-title>
-<md-date>1973-1980</md-date>
-<md-description>Vols. 2, 8: Missoula, Mont. : Published by Scholars Press for Biblical Research Associates</md-description><location id="localhost:9999/db1" name="db1">
-<md-title>The Computer Bible</md-title>
-<md-date>1973-1980</md-date>
-<md-description>Hebrew and Greek; introductions in English</md-description>
-<md-description>Vols. 2, 8: Missoula, Mont. : Published by Scholars Press for Biblical Research Associates</md-description></location>
-<relevance>200000</relevance>
-<recid>title the computer bible</recid>
-</hit>
-<hit>
-
-<md-title>Computer processing of dynamic images from an Anger scintillation camera</md-title>
-<md-title-remainder>the proceedings of a workshop</md-title-remainder>
-<md-date>1974</md-date><location id="localhost:9999/db1" name="db1">
-<md-title>Computer processing of dynamic images from an Anger scintillation camera</md-title>
-<md-title-remainder>the proceedings of a workshop</md-title-remainder>
-<md-date>1974</md-date></location>
-<relevance>60000</relevance>
-<recid>title computer processing of dynamic images from an anger scintillation camera</recid>
-</hit>
 </show>
index d9ad8e6..fdb5227 100644 (file)
 <show>
 <status>OK</status>
 <activeclients>0</activeclients>
-<merged>17</merged>
+<merged>3</merged>
 <total>17</total>
 <start>0</start>
-<num>17</num>
+<num>3</num>
 <hit>
 
 <md-title>UTAH GEOCHROMOMETRY</md-title><location id="z3950.indexdata.com/gils" name="Index Data GILS test server">
 <md-title>UTAH GEOCHROMOMETRY</md-title></location>
-<relevance>190796</relevance>
+<relevance>300000</relevance>
 <recid>title utah geochromometry author medium book</recid>
 </hit>
 <hit>
 
-<md-title>UTAH CRIB FILE</md-title><location id="z3950.indexdata.com/gils" name="Index Data GILS test server">
-<md-title>UTAH CRIB FILE</md-title></location>
-<relevance>127197</relevance>
-<recid>title utah crib file author medium book</recid>
-</hit>
-<hit>
-
 <md-title>UTAH EARTHQUAKE EPICENTERS</md-title><location id="z3950.indexdata.com/gils" name="Index Data GILS test server">
 <md-title>UTAH EARTHQUAKE EPICENTERS</md-title></location>
-<relevance>127197</relevance>
+<relevance>200000</relevance>
 <recid>title utah earthquake epicenters author medium book</recid>
 </hit>
 <hit>
 
-<md-title>BIBLIOGRAPHY OF UTAH GEOLOGY</md-title><location id="z3950.indexdata.com/gils" name="Index Data GILS test server">
-<md-title>BIBLIOGRAPHY OF UTAH GEOLOGY</md-title></location>
-<relevance>95398</relevance>
-<recid>title bibliography of utah geology author medium book</recid>
-</hit>
-<hit>
-
-<md-title>UTAH GEOLOGIC MAP BIBLIOGRAPHY</md-title><location id="z3950.indexdata.com/gils" name="Index Data GILS test server">
-<md-title>UTAH GEOLOGIC MAP BIBLIOGRAPHY</md-title></location>
-<relevance>95398</relevance>
-<recid>title utah geologic map bibliography author medium book</recid>
-</hit>
-<hit>
-
-<md-title>UTAH GEOLOGICAL ASSOCIATION PUBLICATIONS</md-title><location id="z3950.indexdata.com/gils" name="Index Data GILS test server">
-<md-title>UTAH GEOLOGICAL ASSOCIATION PUBLICATIONS</md-title></location>
-<relevance>95398</relevance>
-<recid>title utah geological association publications author medium book</recid>
-</hit>
-<hit>
-
-<md-title>UTAH GEOLOGICAL SOCIETY PUBLICATIONS</md-title><location id="z3950.indexdata.com/gils" name="Index Data GILS test server">
-<md-title>UTAH GEOLOGICAL SOCIETY PUBLICATIONS</md-title></location>
-<relevance>95398</relevance>
-<recid>title utah geological society publications author medium book</recid>
-</hit>
-<hit>
-
-<md-title>UTAH OIL FIELD FILE</md-title><location id="z3950.indexdata.com/gils" name="Index Data GILS test server">
-<md-title>UTAH OIL FIELD FILE</md-title></location>
-<relevance>95398</relevance>
-<recid>title utah oil field file author medium book</recid>
-</hit>
-<hit>
-
 <md-title>UTAH GEOLOGICAL AND MINERAL SURVEY PUBLICATIONS</md-title><location id="z3950.indexdata.com/gils" name="Index Data GILS test server">
 <md-title>UTAH GEOLOGICAL AND MINERAL SURVEY PUBLICATIONS</md-title></location>
-<relevance>63598</relevance>
+<relevance>100000</relevance>
 <recid>title utah geological and mineral survey publications author medium book</recid>
 </hit>
-<hit>
-
-<md-title>APPLIED GEOLOGY FILE</md-title><location id="z3950.indexdata.com/gils" name="Index Data GILS test server">
-<md-title>APPLIED GEOLOGY FILE</md-title></location>
-<relevance>0</relevance>
-<recid>title applied geology file author medium book</recid>
-</hit>
-<hit>
-
-<md-title>COAL SAMPLE BANK</md-title><location id="z3950.indexdata.com/gils" name="Index Data GILS test server">
-<md-title>COAL SAMPLE BANK</md-title></location>
-<relevance>0</relevance>
-<recid>title coal sample bank author medium book</recid>
-</hit>
-<hit>
-
-<md-title>ELECTRIC LOG LIBRARY</md-title><location id="z3950.indexdata.com/gils" name="Index Data GILS test server">
-<md-title>ELECTRIC LOG LIBRARY</md-title></location>
-<relevance>0</relevance>
-<recid>title electric log library author medium book</recid>
-</hit>
-<hit>
-
-<md-title>INTERMOUNTAIN ASSOCIATION OF PETROLEUM GEOLOGISTS/GEOLOGISTS PUBLICATIONS</md-title><location id="z3950.indexdata.com/gils" name="Index Data GILS test server">
-<md-title>INTERMOUNTAIN ASSOCIATION OF PETROLEUM GEOLOGISTS/GEOLOGISTS PUBLICATIONS</md-title></location>
-<relevance>0</relevance>
-<recid>title intermountain association of petroleum geologists geologists publications author medium book</recid>
-</hit>
-<hit>
-
-<md-title>MEASURED GEOLOGIC SECTIONS</md-title><location id="z3950.indexdata.com/gils" name="Index Data GILS test server">
-<md-title>MEASURED GEOLOGIC SECTIONS</md-title></location>
-<relevance>0</relevance>
-<recid>title measured geologic sections author medium book</recid>
-</hit>
-<hit>
-
-<md-title>MINE MAP INDEX</md-title><location id="z3950.indexdata.com/gils" name="Index Data GILS test server">
-<md-title>MINE MAP INDEX</md-title></location>
-<relevance>0</relevance>
-<recid>title mine map index author medium book</recid>
-</hit>
-<hit>
-
-<md-title>OIL IMPREGNATED ROCK DEPOSITS</md-title><location id="z3950.indexdata.com/gils" name="Index Data GILS test server">
-<md-title>OIL IMPREGNATED ROCK DEPOSITS</md-title></location>
-<relevance>0</relevance>
-<recid>title oil impregnated rock deposits author medium book</recid>
-</hit>
-<hit>
-
-<md-title>WELL SAMPLE LIBRARY</md-title><location id="z3950.indexdata.com/gils" name="Index Data GILS test server">
-<md-title>WELL SAMPLE LIBRARY</md-title></location>
-<relevance>0</relevance>
-<recid>title well sample library author medium book</recid>
-</hit>
 </show>
index e0d8137..a8f944e 100644 (file)
@@ -3,12 +3,13 @@ http://localhost:9763/search.pz2?session=1&command=settings&pz:sru%5Blocalhost%3
 http://localhost:9763/search.pz2?session=1&command=search&query=su%3D%22computer%22
 4 http://localhost:9763/search.pz2?session=1&command=show&block=1
 http://localhost:9763/search.pz2?session=1&command=bytarget
-http://localhost:9763/search.pz2?session=1&command=termlist&name=xtargets%2Cauthor%2Csubject%2Cdate
+http://localhost:9763/search.pz2?session=1&command=termlist&name=xtargets%2Csubject%2Cauthor%2Cdate%2Cmedium
 http://localhost:9763/search.pz2?command=init&clear=1
 http://localhost:9763/search.pz2?session=2&command=settings&pz:sru%5Blocalhost%3A8983%2Fsolr%2Fselect%5D=solr&pz%3Aname%5Blocalhost%3A8983%2Fsolr%2Fselect%5D=SOLR+Test&pz%3Acclmap%3Ati%5Blocalhost%3A8983%2Fsolr%2Fselect%5D=1%3Dtitle&pz%3Acclmap%3Asu%5Blocalhost%3A8983%2Fsolr%2Fselect%5D=1%3Dsubject&pz%3Acclmap%3Aau%5Blocalhost%3A8983%2Fsolr%2Fselect%5D=1%3Dauthor&pz%3Acclmap%3Aisbn%5Blocalhost%3A8983%2Fsolr%2Fselect%5D=1%3Disbn&pz%3Acclmap%3Aterm%5Blocalhost%3A8983%2Fsolr%2Fselect%5D=1%3Dtitle&pz%3Axslt%5Blocalhost%3A8983%2Fsolr%2Fselect%5D=solr-pz2.xsl&pz%3Aqueryencoding%5Blocalhost%3A8983%2Fsolr%2Fselect%5D=UTF-8&pz%3Aapdulog%5Blocalhost%3A8983%2Fsolr%2Fselect%5D=1&pz:termlist_term_count%5Blocalhost%3A8983%2Fsolr%2Fselect%5D=5&pz:preferred%5Blocalhost%3A8983%2Fsolr%2Fselect%5D=1
 http://localhost:9763/search.pz2?session=2&command=search&query=su%3D%22computer%22
-http://localhost:9763/search.pz2?session=1&command=termlist&name=xtargets%2Cauthor%2Csubject%2Cdate
+http://localhost:9763/search.pz2?session=1&command=termlist&name=xtargets%2Csubject%2Cauthor%2Cdate%2Cmedium
 http://localhost:9763/search.pz2?session=2&command=show&block=preferred
 http://localhost:9763/search.pz2?session=2&command=search&query=su%3D%22xyzy%22
 http://localhost:9763/search.pz2?session=2&command=show&block=preferred
-http://localhost:9763/search.pz2?session=1&command=termlist&name=xtargets%2Cauthor%2Csubject%2Cdate
+http://localhost:9763/search.pz2?session=1&command=termlist&name=xtargets%2Csubject%2Cauthor%2Cdate%2Cmedium
+http://localhost:9763/search.pz2?session=2&command=termlist&name=xtargets%2Csubject%2Cauthor%2Cdate%2Cmedium
\ No newline at end of file
diff --git a/test/test_solr_12.res b/test/test_solr_12.res
new file mode 100644 (file)
index 0000000..ab63fe6
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<search><status>OK</status></search>
\ No newline at end of file
diff --git a/test/test_solr_13.res b/test/test_solr_13.res
new file mode 100644 (file)
index 0000000..d3b889f
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<show>
+<status>OK</status>
+<activeclients>0</activeclients>
+<merged>0</merged>
+<total>0</total>
+<start>0</start>
+<num>0</num>
+</show>
diff --git a/test/test_solr_14.res b/test/test_solr_14.res
new file mode 100644 (file)
index 0000000..7e31492
--- /dev/null
@@ -0,0 +1,11 @@
+<termlist>
+<activeclients>0</activeclients>
+<list name="xtargets">
+</list>
+<list name="author">
+</list>
+<list name="subject">
+</list>
+<list name="date">
+</list>
+</termlist>
diff --git a/test/test_solr_15.res b/test/test_solr_15.res
new file mode 100644 (file)
index 0000000..b98d670
--- /dev/null
@@ -0,0 +1,13 @@
+<termlist>
+<activeclients>0</activeclients>
+<list name="xtargets">
+</list>
+<list name="subject">
+</list>
+<list name="author">
+</list>
+<list name="date">
+</list>
+<list name="medium">
+</list>
+</termlist>