Merge branch 'block-error-warning'
authorDennis Schafroth <dennis@indexdata.com>
Wed, 7 Mar 2012 11:20:14 +0000 (12:20 +0100)
committerDennis Schafroth <dennis@indexdata.com>
Wed, 7 Mar 2012 11:20:14 +0000 (12:20 +0100)
src/http_command.c
test/Makefile.am
test/test_termlist_block.res [deleted file]
test/test_termlist_block.urls
test/test_termlist_block_10.res
test/test_termlist_block_11.res
test/test_termlist_block_12.res [new file with mode: 0644]
test/test_termlist_block_13.res [new file with mode: 0644]
test/test_termlist_block_5.res
test/test_termlist_block_9.res

index 854de13..e3c0c69 100644 (file)
@@ -510,7 +510,7 @@ static void cmd_settings(struct http_channel *c)
     release_session(c, s);
 }
 
-static void termlist_response(struct http_channel *c, struct http_session *s)
+static void termlist_response(struct http_channel *c, struct http_session *s, const char *cmd_status)
 {
     struct http_request *rq = c->request;
     const char *name = http_argbyname(rq, "name");
@@ -524,6 +524,10 @@ static void termlist_response(struct http_channel *c, struct http_session *s)
     status = session_active_clients(s->psession);
 
     response_open_no_status(c, "termlist");
+    /* new protocol add a status to response. Triggered by a status parameter */
+    if (cmd_status != 0) {
+        wrbuf_printf(c->wrbuf, "<status>%s</status>\n", cmd_status);
+    }
     wrbuf_printf(c->wrbuf, "<activeclients>%d</activeclients>\n", status);
 
     perform_termlist(c, s->psession, name, num);
@@ -534,10 +538,15 @@ static void termlist_response(struct http_channel *c, struct http_session *s)
 static void termlist_result_ready(void *data)
 {
     struct http_channel *c = (struct http_channel *) data;
+    struct http_request *rq = c->request;
+    const char *report = http_argbyname(rq, "report");
+    const char *status = 0;
     struct http_session *s = locate_session(c);
+    if (report && !strcmp("status", report))
+        status = "OK";
     if (s) {
         yaz_log(c->http_sessions->log_level, "Session %u termlist watch released", s->session_id);
-        termlist_response(c, s);
+        termlist_response(c, s, status);
         release_session(c,s);
     }
 }
@@ -548,12 +557,23 @@ static void cmd_termlist(struct http_channel *c)
     struct http_response *rs = c->response;
     struct http_session *s = locate_session(c);
     const char *block = http_argbyname(rq, "block");
+    const char *report = http_argbyname(rq, "report");
+    int report_status = 0;
+    int report_error = 0;
+    const char *status_message = 0;
     int active_clients;
+    if (report  && !strcmp("error", report)) {
+        report_error = 1;
+        status_message = "OK";
+    }
+    if (report  && !strcmp("status", report)) {
+        report_status = 1;
+        status_message = "OK";
+    }
     if (!s)
         return;
 
     active_clients = session_active_clients(s->psession);
-
     if (block && !strcmp("1", block) && active_clients)
     {
         // if there is already a watch/block. we do not block this one
@@ -561,17 +581,27 @@ static void cmd_termlist(struct http_channel *c)
                               termlist_result_ready, c, c) != 0)
         {
             yaz_log(YLOG_WARN, "Session %u: Attempt to block multiple times on termlist block. Not supported!", s->session_id);
-            error(rs, PAZPAR2_ALREADY_BLOCKED, "termlist");
+            if (report_error) {
+                error(rs, PAZPAR2_ALREADY_BLOCKED, "termlist");
+                release_session(c, s);
+                return;
+            }
+            else if (report_status) {
+                status_message = "WARNING (Already blocked on termlist)";
+            }
+            else {
+                yaz_log(YLOG_WARN, "Session %u: Ignoring termlist block. Return current result", s->session_id);
+            }
         }
         else
         {
             yaz_log(c->http_sessions->log_level, "Session %u: Blocking on command termlist", s->session_id);
+            release_session(c, s);
+            return;
         }
-        release_session(c, s);
-        return;
     }
 
-    termlist_response(c, s);
+    termlist_response(c, s, status_message);
     release_session(c, s);
 }
 
@@ -641,14 +671,22 @@ static void cmd_server_status(struct http_channel *c)
     xmalloc_trav(0);
 }
 
-static void bytarget_response(struct http_channel *c, struct http_session *s) {
+static void bytarget_response(struct http_channel *c, struct http_session *s, const char *cmd_status) {
     int count, i;
     struct hitsbytarget *ht;
     struct http_request *rq = c->request;
     const char *settings = http_argbyname(rq, "settings");
 
     ht = get_hitsbytarget(s->psession, &count, c->nmem);
-    response_open(c, "bytarget");
+    if (!cmd_status)
+        /* Old protocol, always ok */
+        response_open(c, "bytarget");
+    else {
+        /* New protocol, OK or WARNING (...)*/
+        response_open_no_status(c, "bytarget");
+        wrbuf_printf(c->wrbuf, "<status>%s</status>", cmd_status);
+    }
+
     if (count == 0)
         yaz_log(YLOG_WARN, "Empty bytarget Response. No targets found!");
     for (i = 0; i < count; i++)
@@ -701,9 +739,10 @@ static void bytarget_result_ready(void *data)
 {
     struct http_channel *c = (struct http_channel *) data;
     struct http_session *s = locate_session(c);
+    const char *status_message = "OK";
     if (s) {
         yaz_log(c->http_sessions->log_level, "Session %u: bytarget watch released", s->session_id);
-        bytarget_response(c, s);
+        bytarget_response(c, s, status_message);
         release_session(c, s);
     }
     else {
@@ -718,13 +757,23 @@ static void cmd_bytarget(struct http_channel *c)
     struct http_response *rs = c->response;
     struct http_session *s = locate_session(c);
     const char *block = http_argbyname(rq, "block");
+    const char *report = http_argbyname(rq, "report");
+    int report_error = 0;
+    int report_status = 0;
+    const char *status_message = "OK";
     int no_active;
 
+    if (report && !strcmp("error", report)) {
+        report_error = 1;
+    }
+    if (report && !strcmp("status", report)) {
+        report_status = 1;
+    }
+
     if (!s)
         return;
 
     no_active = session_active_clients(s->psession);
-
     if (block && !strcmp("1",block) && no_active)
     {
         // if there is already a watch/block. we do not block this one
@@ -732,16 +781,26 @@ static void cmd_bytarget(struct http_channel *c)
                               bytarget_result_ready, c, c) != 0)
         {
             yaz_log(YLOG_WARN, "Session %u: Attempt to block multiple times on bytarget block. Not supported!", s->session_id);
-            error(rs, PAZPAR2_ALREADY_BLOCKED, "bytarget"); 
+            if (report_error) {
+                error(rs, PAZPAR2_ALREADY_BLOCKED, "bytarget");
+                release_session(c, s);
+                return;
+            }
+            else if (report_status) {
+                status_message = "WARNING (Already blocked on bytarget)";
+            }
+            else {
+                yaz_log(YLOG_WARN, "Session %u: Ignoring bytarget block. Return current result.", s->session_id);
+            }
         }
         else
         {
             yaz_log(c->http_sessions->log_level, "Session %u: Blocking on command bytarget", s->session_id);
+            release_session(c, s);
+            return;
         }
-        release_session(c, s);
-        return;
     }
-    bytarget_response(c, s);
+    bytarget_response(c, s, status_message);
     release_session(c, s);
 }
 
@@ -1067,9 +1126,13 @@ static void cmd_show(struct http_channel *c)
     struct http_session *s = locate_session(c);
     const char *block = http_argbyname(rq, "block");
     const char *sort = http_argbyname(rq, "sort");
+    const char *block_error = http_argbyname(rq, "report");
     struct reclist_sortparms *sp;
     int status;
-
+    int report_error = 0;
+    if (block_error && !strcmp("1", block_error)) {
+        report_error = 1;
+    }    
     if (!s)
         return;
 
@@ -1096,32 +1159,46 @@ static void cmd_show(struct http_channel *c)
             {
                 yaz_log(c->http_sessions->log_level,
                         "Session %u: Blocking on command show (preferred targets)", s->session_id);
+                release_session(c, s);
+                return;
             }
             else
             {
-                yaz_log(YLOG_WARN, "Attempt to block multiple times on show (preferred targets) block. Not supported!");
-                error(rs, PAZPAR2_ALREADY_BLOCKED, "show (preferred targets)"); 
+                yaz_log(YLOG_WARN, "Session %u: Attempt to block multiple times on show (preferred targets) block. Not supported!", 
+                    s->session_id);
+                if (report_error) {
+                    error(rs, PAZPAR2_ALREADY_BLOCKED, "show (preferred targets)");
+                    release_session(c, s);
+                    return;
+                }
+                else {
+                    yaz_log(YLOG_WARN, "Session %u: Ignoring show(preferred) block. Returning current result.", s->session_id);
+                }
             }
-            release_session(c, s);
-            return;
 
         }
         else if (status)
         {
             // if there is already a watch/block. we do not block this one
             if (session_set_watch(s->psession, SESSION_WATCH_SHOW,
-                                  show_records_ready, c, c) != 0
-                )
+                                  show_records_ready, c, c) != 0)
             {
-                yaz_log(YLOG_WARN, "Attempt to block multiple times on show block. Not supported!");
-                error(rs, PAZPAR2_ALREADY_BLOCKED, "show"); 
+                yaz_log(YLOG_WARN, "Session %u: Attempt to block multiple times on show block. Not supported!", s->session_id);
+                if (report_error) {
+                    error(rs, PAZPAR2_ALREADY_BLOCKED, "show");
+                    release_session(c, s);
+                    return;
+                }
+                else {
+                    yaz_log(YLOG_WARN, "Session %u: Ignoring show block. Returning current result.", s->session_id);
+                }
             }
             else
             {
                 yaz_log(c->http_sessions->log_level, "Session %u: Blocking on command show", s->session_id);
+                release_session(c, s);
+                return;
             }
-            release_session(c, s);
-            return;
         }
     }
     show_records(c, s, status);
index a40eabb..89c17dd 100644 (file)
@@ -1,7 +1,7 @@
 # This file is part of Pazpar2.
 check_SCRIPTS = test_http.sh test_icu.sh test_post.sh \
  test_settings.sh test_turbomarcxml.sh test_facets.sh \
- test_solr.sh test_url.sh test_filter.sh
+ test_solr.sh test_url.sh test_filter.sh test_termlist_block.sh
 
 EXTRA_DIST = run_pazpar2.sh marc21_test.xsl tmarc.xsl solr-pz2.xsl \
        z3950_indexdata_com_marc.xml \
@@ -15,6 +15,7 @@ EXTRA_DIST = run_pazpar2.sh marc21_test.xsl tmarc.xsl solr-pz2.xsl \
        test_turbomarcxml.cfg test_turbomarcxml.urls \
        test_url.cfg test_url.urls \
        test_filter.cfg test_filter.urls \
+       test_termlist_block.cfg test_termlist_block.urls \
        $(check_SCRIPTS)
 
 TESTS = $(check_SCRIPTS)
diff --git a/test/test_termlist_block.res b/test/test_termlist_block.res
deleted file mode 100644 (file)
index e69de29..0000000
index 07fd600..5bee1cd 100644 (file)
@@ -1,11 +1,13 @@
 http://localhost:9763/search.pz2?command=init&clear=1
-http://localhost:9763/search.pz2?session=1&command=settings&full_text_target%5Bid_ocw%5D=NO&use_url_proxy%5Bid_ocw%5D=0&pz:preferred%5Bid_ocw%5D=1&pz:piggyback%5Bid_ocw%5D=1&pz:authentication%5Bid_ocw%5D=idtest%2Fidtest36&pz:cclmap%3Asu%5Bid_ocw%5D=u%3D21+s%3Dal&use_thumbnails%5Bid_ocw%5D=1&pz:requestsyntax%5Bid_ocw%5D=xml&pz:name%5Bid_ocw%5D=MIT+OpenCourseWare&pz:cclmap%3Aissn%5Bid_ocw%5D=u%3D8&pz:cclmap%3Ati%5Bid_ocw%5D=u%3D4+s%3Dal&pz:cclmap%3Aau%5Bid_ocw%5D=u%3D1003+s%3Dal&pz:xslt%5Bid_ocw%5D=cf.xsl&pz:cclmap%3Aterm%5Bid_ocw%5D=u%3D1016+t%3Dl%2Cr+s%3Dal+2%3D102&pz:cclmap%3Aisbn%5Bid_ocw%5D=u%3D7&pz:queryencoding%5Bid_ocw%5D=UTF-8&pz:url%5Bid_ocw%5D=connect.indexdata.com%3A9000%2Fmit_opencourseware
-http://localhost:9763/search.pz2?session=1&command=search&query=su%3D%22computer%22
+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
+http://localhost:9763/search.pz2?session=1&command=search&query=computer
 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&block=1&name=xtargets%2Cauthor%2Csubject%2Cdate
 http://localhost:9763/search.pz2?session=1&command=settings&full_text_target%5Bid_solr%5D=NO&pz:termlist_term_count%5Bid_solr%5D=10&use_url_proxy%5Bid_solr%5D=0&pz:piggyback%5Bid_solr%5D=1&pz:preferred%5Bid_solr%5D=0&pz:block_timeout%5Bid_solr%5D=2&pz:cclmap%3Asu%5Bid_solr%5D=1%3Dsubject&pz:sru%5Bid_solr%5D=solr&use_thumbnails%5Bid_solr%5D=0&pz:name%5Bid_solr%5D=LOC+%28SOLR%29&pz:cclmap%3Aissn%5Bid_solr%5D=u%3D8&pz:cclmap%3Ati%5Bid_solr%5D=1%3Dtitle&pz:cclmap%3Aau%5Bid_solr%5D=1%3Dauthor&pz:xslt%5Bid_solr%5D=solr-pz2.xsl&pz:cclmap%3Aterm%5Bid_solr%5D=1%3Dtext+s%3Dal&pz:cclmap%3Aisbn%5Bid_solr%5D=1%3Disbn&pz:queryencoding%5Bid_solr%5D=UTF-8&pz:url%5Bid_solr%5D=ocs-test.indexdata.com%2Fsolr%2Fselect
-http://localhost:9763/search.pz2?session=1&command=search&query=su%3D%22computer%22
+http://localhost:9763/search.pz2?session=1&command=search&query=computer
 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&block=1&name=xtargets%2Cauthor%2Csubject%2Cdate
+http://localhost:9763/search.pz2?session=1&command=termlist&block=1&report=status&name=xtargets%2Cauthor%2Csubject%2Cdate
+http://localhost:9763/search.pz2?session=1&command=bytarget&report=status
index 26b31c0..ba3ef40 100644 (file)
@@ -1,16 +1,16 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <bytarget><status>OK</status>
-<target><id>id_ocw</id>
-<name>MIT OpenCourseWare</name>
+<target><id>localhost:9999/db1</id>
+<name>db1</name>
 <hits>0</hits>
-<diagnostic>114</diagnostic>
-<addinfo> (backend=localhost:9003)</addinfo>
+<diagnostic>10000</diagnostic>
+<addinfo>localhost:9999/db1</addinfo>
 <records>0</records>
 <state>Client_Error</state>
 </target>
 <target><id>id_solr</id>
 <name>LOC (SOLR)</name>
-<hits>1043</hits>
+<hits>2015</hits>
 <diagnostic>0</diagnostic>
 <records>100</records>
 <state>Client_Idle</state>
index 9076038..4a1f0a0 100644 (file)
@@ -4,51 +4,55 @@
 <term>
 <id>id_solr</id>
 <name>LOC (SOLR)</name>
-<frequency>1043</frequency>
+<frequency>2015</frequency>
 <state>Client_Idle</state>
 <diagnostic>0</diagnostic>
 </term>
 </list>
 <list name="author">
+<term><name>Davis, Phyllis</name><frequency>2</frequency></term>
+<term><name>Langer, Maria</name><frequency>2</frequency></term>
 <term><name>Norton, Peter</name><frequency>2</frequency></term>
+<term><name>Watt, Alan H</name><frequency>2</frequency></term>
+<term><name>Abass, Olayide</name><frequency>1</frequency></term>
 <term><name>Aldrich, Richard W</name><frequency>1</frequency></term>
-<term><name>Anderson, Robert H</name><frequency>1</frequency></term>
-<term><name>Arnold, Ken</name><frequency>1</frequency></term>
-<term><name>Burgess, Mark</name><frequency>1</frequency></term>
-<term><name>Carasik, Anne H</name><frequency>1</frequency></term>
-<term><name>Davis, Phyllis</name><frequency>1</frequency></term>
+<term><name>Appleman, Daniel</name><frequency>1</frequency></term>
+<term><name>Bainbridge, David I</name><frequency>1</frequency></term>
+<term><name>Caplin, Steve</name><frequency>1</frequency></term>
+<term><name>Cole, Eric</name><frequency>1</frequency></term>
+<term><name>De Jong, Kenneth A</name><frequency>1</frequency></term>
 <term><name>Dowd, Kevin</name><frequency>1</frequency></term>
-<term><name>Farley, Marc</name><frequency>1</frequency></term>
-<term><name>Gennick, Jonathan</name><frequency>1</frequency></term>
-<term><name>Hawke, Constance S</name><frequency>1</frequency></term>
-<term><name>Hopgood, Adrian A</name><frequency>1</frequency></term>
+<term><name>Hodges, M. Susan</name><frequency>1</frequency></term>
 <term><name>Kaasgaard, Klaus</name><frequency>1</frequency></term>
-<term><name>Knittel, John</name><frequency>1</frequency></term>
-<term><name>Loudon, Kyle</name><frequency>1</frequency></term>
+<term><name>Lasser, Jon</name><frequency>1</frequency></term>
 </list>
 <list name="subject">
-<term><name>Computer file</name><frequency>35</frequency></term>
-<term><name>Computers</name><frequency>30</frequency></term>
-<term><name>Computer networks</name><frequency>22</frequency></term>
-<term><name>Computer science</name><frequency>16</frequency></term>
-<term><name>Computer graphics</name><frequency>15</frequency></term>
-<term><name>Computer security</name><frequency>15</frequency></term>
-<term><name>Operating systems</name><frequency>14</frequency></term>
-<term><name>Computer program language</name><frequency>13</frequency></term>
-<term><name>Microsoft Windows</name><frequency>13</frequency></term>
-<term><name>Computer software</name><frequency>8</frequency></term>
-<term><name>Computer systems</name><frequency>8</frequency></term>
-<term><name>Computer architecture</name><frequency>7</frequency></term>
-<term><name>Computer programs</name><frequency>6</frequency></term>
-<term><name>Internet</name><frequency>6</frequency></term>
-<term><name>Computer animation</name><frequency>5</frequency></term>
+<term><name>Computers</name><frequency>21</frequency></term>
+<term><name>Computer file</name><frequency>20</frequency></term>
+<term><name>Computer networks</name><frequency>15</frequency></term>
+<term><name>Computer science</name><frequency>11</frequency></term>
+<term><name>Computer graphics</name><frequency>10</frequency></term>
+<term><name>Computer program language</name><frequency>10</frequency></term>
+<term><name>Computer security</name><frequency>10</frequency></term>
+<term><name>Computer crimes</name><frequency>7</frequency></term>
+<term><name>Computer software</name><frequency>7</frequency></term>
+<term><name>Microsoft Windows</name><frequency>7</frequency></term>
+<term><name>Computer</name><frequency>6</frequency></term>
+<term><name>Operating systems</name><frequency>6</frequency></term>
+<term><name>Computer programs</name><frequency>5</frequency></term>
+<term><name>Computer systems</name><frequency>5</frequency></term>
+<term><name>UNIX</name><frequency>5</frequency></term>
 </list>
 <list name="date">
-<term><name>2000</name><frequency>53</frequency></term>
-<term><name>2001</name><frequency>23</frequency></term>
-<term><name>1999</name><frequency>17</frequency></term>
-<term><name>1998</name><frequency>5</frequency></term>
-<term><name>2002</name><frequency>2</frequency></term>
-<term><name>1997</name><frequency>1</frequency></term>
+<term><name>2000</name><frequency>48</frequency></term>
+<term><name>1999</name><frequency>20</frequency></term>
+<term><name>2001</name><frequency>14</frequency></term>
+<term><name>1998</name><frequency>11</frequency></term>
+<term><name>1997</name><frequency>2</frequency></term>
+<term><name>1992</name><frequency>1</frequency></term>
+<term><name>1994</name><frequency>1</frequency></term>
+<term><name>1995</name><frequency>1</frequency></term>
+<term><name>1996</name><frequency>1</frequency></term>
+<term><name>2002</name><frequency>1</frequency></term>
 </list>
 </termlist>
\ No newline at end of file
diff --git a/test/test_termlist_block_12.res b/test/test_termlist_block_12.res
new file mode 100644 (file)
index 0000000..525f73d
--- /dev/null
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<termlist><status>OK</status>
+<activeclients>0</activeclients>
+<list name="xtargets">
+<term>
+<id>id_solr</id>
+<name>LOC (SOLR)</name>
+<frequency>2015</frequency>
+<state>Client_Idle</state>
+<diagnostic>0</diagnostic>
+</term>
+</list>
+<list name="author">
+<term><name>Davis, Phyllis</name><frequency>2</frequency></term>
+<term><name>Langer, Maria</name><frequency>2</frequency></term>
+<term><name>Norton, Peter</name><frequency>2</frequency></term>
+<term><name>Watt, Alan H</name><frequency>2</frequency></term>
+<term><name>Abass, Olayide</name><frequency>1</frequency></term>
+<term><name>Aldrich, Richard W</name><frequency>1</frequency></term>
+<term><name>Appleman, Daniel</name><frequency>1</frequency></term>
+<term><name>Bainbridge, David I</name><frequency>1</frequency></term>
+<term><name>Caplin, Steve</name><frequency>1</frequency></term>
+<term><name>Cole, Eric</name><frequency>1</frequency></term>
+<term><name>De Jong, Kenneth A</name><frequency>1</frequency></term>
+<term><name>Dowd, Kevin</name><frequency>1</frequency></term>
+<term><name>Hodges, M. Susan</name><frequency>1</frequency></term>
+<term><name>Kaasgaard, Klaus</name><frequency>1</frequency></term>
+<term><name>Lasser, Jon</name><frequency>1</frequency></term>
+</list>
+<list name="subject">
+<term><name>Computers</name><frequency>21</frequency></term>
+<term><name>Computer file</name><frequency>20</frequency></term>
+<term><name>Computer networks</name><frequency>15</frequency></term>
+<term><name>Computer science</name><frequency>11</frequency></term>
+<term><name>Computer graphics</name><frequency>10</frequency></term>
+<term><name>Computer program language</name><frequency>10</frequency></term>
+<term><name>Computer security</name><frequency>10</frequency></term>
+<term><name>Computer crimes</name><frequency>7</frequency></term>
+<term><name>Computer software</name><frequency>7</frequency></term>
+<term><name>Microsoft Windows</name><frequency>7</frequency></term>
+<term><name>Computer</name><frequency>6</frequency></term>
+<term><name>Operating systems</name><frequency>6</frequency></term>
+<term><name>Computer programs</name><frequency>5</frequency></term>
+<term><name>Computer systems</name><frequency>5</frequency></term>
+<term><name>UNIX</name><frequency>5</frequency></term>
+</list>
+<list name="date">
+<term><name>2000</name><frequency>48</frequency></term>
+<term><name>1999</name><frequency>20</frequency></term>
+<term><name>2001</name><frequency>14</frequency></term>
+<term><name>1998</name><frequency>11</frequency></term>
+<term><name>1997</name><frequency>2</frequency></term>
+<term><name>1992</name><frequency>1</frequency></term>
+<term><name>1994</name><frequency>1</frequency></term>
+<term><name>1995</name><frequency>1</frequency></term>
+<term><name>1996</name><frequency>1</frequency></term>
+<term><name>2002</name><frequency>1</frequency></term>
+</list>
+</termlist>
\ No newline at end of file
diff --git a/test/test_termlist_block_13.res b/test/test_termlist_block_13.res
new file mode 100644 (file)
index 0000000..ba3ef40
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bytarget><status>OK</status>
+<target><id>localhost:9999/db1</id>
+<name>db1</name>
+<hits>0</hits>
+<diagnostic>10000</diagnostic>
+<addinfo>localhost:9999/db1</addinfo>
+<records>0</records>
+<state>Client_Error</state>
+</target>
+<target><id>id_solr</id>
+<name>LOC (SOLR)</name>
+<hits>2015</hits>
+<diagnostic>0</diagnostic>
+<records>100</records>
+<state>Client_Idle</state>
+</target></bytarget>
\ No newline at end of file
index 21c06dc..0595f75 100644 (file)
@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <bytarget><status>OK</status>
-<target><id>id_ocw</id>
-<name>MIT OpenCourseWare</name>
+<target><id>localhost:9999/db1</id>
+<name>db1</name>
 <hits>0</hits>
-<diagnostic>114</diagnostic>
-<addinfo> (backend=localhost:9003)</addinfo>
+<diagnostic>10000</diagnostic>
+<addinfo>localhost:9999/db1</addinfo>
 <records>0</records>
 <state>Client_Error</state>
 </target></bytarget>
\ No newline at end of file
index 53e98fc..944b938 100644 (file)
@@ -2,7 +2,7 @@
 <show><status>OK</status>
 <activeclients>0</activeclients>
 <merged>100</merged>
-<total>1043</total>
+<total>2015</total>
 <start>0</start>
 <num>20</num>
 <hit>
@@ -15,7 +15,7 @@
 <md-title-remainder>fast &amp; easy</md-title-remainder>
 <md-date>2001</md-date>
 <md-author>Woodward, C. Michael</md-author></location>
-<relevance>600000</relevance>
+<relevance>37125</relevance>
 <recid>content: title adobe illustrator for the mac author woodward c michael</recid>
 </hit>
 <hit>
 <md-date>1998</md-date><location id="id_solr" name="LOC (SOLR)">
 <md-title>Advanced computer performance modeling and simulation</md-title>
 <md-date>1998</md-date></location>
-<relevance>600000</relevance>
+<relevance>37125</relevance>
 <recid>content: title advanced computer performance modeling and simulation</recid>
 </hit>
 <hit>
 
-<md-title>Computer security</md-title>
-<md-title-remainder>FAA needs to improve controls over use of foreign nationals to remediate and review software : report to the Chairman, Committee on Science, House of Representatives</md-title-remainder>
-<md-date>1999</md-date>
-<md-description>&quot;GAO/AIMD-00-55.&quot;</md-description><location id="id_solr" name="LOC (SOLR)">
-<md-title>Computer security</md-title>
-<md-title-remainder>FAA needs to improve controls over use of foreign nationals to remediate and review software : report to the Chairman, Committee on Science, House of Representatives</md-title-remainder>
-<md-date>1999</md-date>
-<md-description>Cover title</md-description>
-<md-description>&quot;December 1999.&quot;</md-description>
-<md-description>&quot;GAO/AIMD-00-55.&quot;</md-description>
-<md-description>&quot;B-284308&quot;--P. 1</md-description></location>
-<relevance>600000</relevance>
-<recid>content: title computer security</recid>
-</hit>
-<hit>
-
 <md-title>Cyberterrorism and computer crimes</md-title>
 <md-title-remainder>issues surrounding the establishment of an international regime</md-title-remainder>
 <md-date>2000</md-date>
 <md-date>2000</md-date>
 <md-author>Aldrich, Richard W</md-author>
 <md-description>&quot;April 2000.&quot;</md-description></location>
-<relevance>600000</relevance>
+<relevance>37125</relevance>
 <recid>content: title cyberterrorism and computer crimes author aldrich richard w</recid>
 </hit>
 <hit>
 
+<md-title>Computer interfacing</md-title>
+<md-date>2000</md-date>
+<md-author>Smith, George A</md-author><location id="id_solr" name="LOC (SOLR)">
+<md-title>Computer interfacing</md-title>
+<md-date>2000</md-date>
+<md-author>Smith, George A</md-author></location>
+<relevance>34031</relevance>
+<recid>content: title computer interfacing author smith george a</recid>
+</hit>
+<hit>
+
 <md-title>Software design and usability</md-title>
 <md-title-remainder>talks with Bonnie Nardi, Jakob Nielsen, David Smith, Austin Henderson &amp; Jed Harris, Terry Winograd, Stephanie Rosenbaum</md-title-remainder>
 <md-date>2000</md-date>
@@ -68,7 +63,7 @@
 <md-title-remainder>talks with Bonnie Nardi, Jakob Nielsen, David Smith, Austin Henderson &amp; Jed Harris, Terry Winograd, Stephanie Rosenbaum</md-title-remainder>
 <md-date>2000</md-date>
 <md-author>Kaasgaard, Klaus</md-author></location>
-<relevance>550000</relevance>
+<relevance>34031</relevance>
 <recid>content: title software design and usability author kaasgaard klaus</recid>
 </hit>
 <hit>
 <md-date>2000</md-date>
 <md-author>Knittel, John</md-author>
 <md-description>Explains what computer hacking is, who does it, and how dangerous it can be</md-description></location>
-<relevance>525974</relevance>
+<relevance>32544</relevance>
 <recid>content: title everything you need to know about the dangers of computer hacking author knittel john</recid>
 </hit>
 <hit>
 
-<md-title>Computer and Internet liability</md-title>
-<md-title-remainder>strategies, claims, and defenses</md-title-remainder>
-<md-date>2000</md-date>
-<md-author>Williams, Richard D</md-author>
-<md-description>Rev. ed. of: Law of the year 2000 problem. c1999-</md-description><location id="id_solr" name="LOC (SOLR)">
-<md-title>Computer and Internet liability</md-title>
-<md-title-remainder>strategies, claims, and defenses</md-title-remainder>
-<md-date>2000</md-date>
-<md-author>Williams, Richard D</md-author>
-<md-description>Rev. ed. of: Law of the year 2000 problem. c1999-</md-description>
-<md-description>Includes index</md-description></location>
-<relevance>450000</relevance>
-<recid>content: title computer and internet liability author williams richard d</recid>
+<md-title>Computer peripherals</md-title>
+<md-date>1995</md-date>
+<md-author>Cook, Barry M</md-author><location id="id_solr" name="LOC (SOLR)">
+<md-title>Computer peripherals</md-title>
+<md-date>1995</md-date>
+<md-author>Cook, Barry M</md-author></location>
+<relevance>32484</relevance>
+<recid>content: title computer peripherals author cook barry m</recid>
+</hit>
+<hit>
+
+<md-title>Kids&apos; computer book</md-title>
+<md-date>1994</md-date>
+<md-description>Discusses a variety of educational and game software for children  with suggestions for setting up a computer system. Includes a 3 1/2 in. disk with 6 shareware programs for children</md-description><location id="id_solr" name="LOC (SOLR)">
+<md-title>Kids&apos; computer book</md-title>
+<md-date>1994</md-date>
+<md-description>&quot;For kids and their parents&quot;--Cover</md-description>
+<md-description>Discusses a variety of educational and game software for children  with suggestions for setting up a computer system. Includes a 3 1/2 in. disk with 6 shareware programs for children</md-description></location>
+<relevance>28531</relevance>
+<recid>content: title kids computer book</recid>
+</hit>
+<hit>
+
+<md-title>Computer friendly</md-title>
+<md-date>1999</md-date>
+<md-author>Steinbacher, Raymond</md-author><location id="id_solr" name="LOC (SOLR)">
+<md-title>Computer friendly</md-title>
+<md-date>1999</md-date>
+<md-author>Steinbacher, Raymond</md-author></location>
+<relevance>27843</relevance>
+<recid>content: title computer friendly author steinbacher raymond</recid>
+</hit>
+<hit>
+
+<md-title>Computer misuse</md-title>
+<md-date>1999</md-date>
+<md-description>&quot;Also published as Parliamentary Paper E 31AO&quot;--T.p. verso</md-description><location id="id_solr" name="LOC (SOLR)">
+<md-title>Computer misuse</md-title>
+<md-date>1999</md-date>
+<md-description>&quot;May 1999.&quot;</md-description>
+<md-description>&quot;NZLC R54&quot;--T.p. verso</md-description>
+<md-description>&quot;Also published as Parliamentary Paper E 31AO&quot;--T.p. verso</md-description></location>
+<relevance>27843</relevance>
+<recid>content: title computer misuse</recid>
+</hit>
+<hit>
+
+<md-title>Computer networking</md-title>
+<md-title-remainder>a top-down approach featuring the Internet</md-title-remainder>
+<md-date>2001</md-date>
+<md-author>Ross, Keith W</md-author><location id="id_solr" name="LOC (SOLR)">
+<md-title>Computer networking</md-title>
+<md-title-remainder>a top-down approach featuring the Internet</md-title-remainder>
+<md-date>2001</md-date>
+<md-author>Ross, Keith W</md-author></location>
+<relevance>27843</relevance>
+<recid>content: title computer networking author ross keith w</recid>
 </hit>
 <hit>
 
 <md-date>1998</md-date>
 <md-author>Davis, Phyllis</md-author>
 <md-description>Includes index</md-description></location>
-<relevance>450000</relevance>
+<relevance>27843</relevance>
 <recid>content: title coreldraw for windows author davis phyllis</recid>
 </hit>
 <hit>
 
-<md-title>Inside 3ds max 4</md-title>
-<md-date>2002</md-date>
-<md-description>The accompanying CD-ROM contains all the files needed to complete the exercises contained in the book and links to third-party programs</md-description><location id="id_solr" name="LOC (SOLR)">
-<md-title>Inside 3ds max 4</md-title>
-<md-date>2002</md-date>
-<md-description>Includes index</md-description>
-<md-description>The accompanying CD-ROM contains all the files needed to complete the exercises contained in the book and links to third-party programs</md-description></location>
-<relevance>450000</relevance>
-<recid>content: title inside ds max</recid>
+<md-title>Quicken 2001 Deluxe for Macintosh</md-title>
+<md-title-remainder>the official guide</md-title-remainder>
+<md-date>2001</md-date>
+<md-author>Langer, Maria</md-author>
+<md-description>Includes index</md-description><location id="id_solr" name="LOC (SOLR)">
+<md-title>Quicken 2001 Deluxe for Macintosh</md-title>
+<md-title-remainder>the official guide</md-title-remainder>
+<md-date>2001</md-date>
+<md-author>Langer, Maria</md-author>
+<md-description>Includes index</md-description></location>
+<relevance>27843</relevance>
+<recid>content: title quicken deluxe for macintosh author langer maria</recid>
 </hit>
 <hit>
 
 <md-author>Langer, Maria</md-author>
 <md-description>Includes index</md-description>
 <md-description>&quot;Covers Quicken deluxe 2000 for the Mac&quot;--Cover</md-description></location>
-<relevance>450000</relevance>
+<relevance>27843</relevance>
 <recid>content: title quicken for the mac author langer maria</recid>
 </hit>
 <hit>
 <md-date>1998</md-date><location id="id_solr" name="LOC (SOLR)">
 <md-title>Sicherheit und Schutz im Netz</md-title>
 <md-date>1998</md-date></location>
-<relevance>450000</relevance>
+<relevance>27843</relevance>
 <recid>content: title sicherheit und schutz im netz</recid>
 </hit>
 <hit>
 <md-date>1999</md-date>
 <md-author>Carasik, Anne H</md-author>
 <md-description>Includes index</md-description></location>
-<relevance>450000</relevance>
+<relevance>27843</relevance>
 <recid>content: title unix secure shell author carasik anne h</recid>
 </hit>
 <hit>
 <md-title-remainder>protecting your identity on the Web</md-title-remainder>
 <md-date>1999</md-date>
 <md-author>Marcella, Albert J</md-author></location>
-<relevance>450000</relevance>
+<relevance>27843</relevance>
 <recid>content: title www stopthief net author marcella albert j</recid>
 </hit>
 <hit>
 <md-title-remainder>proceedings, 11-13 October 1999, Boston, Massachusetts</md-title-remainder>
 <md-date>1999</md-date>
 <md-description>&quot;IEEE catalog number 99EX370&quot;--T.p. verso</md-description></location>
-<relevance>425000</relevance>
+<relevance>26297</relevance>
 <recid>content: title eight international conference on computer communications and networks</recid>
 </hit>
 <hit>
 <md-date>2000</md-date>
 <md-author>Farley, Marc</md-author>
 <md-description>Includes index</md-description></location>
-<relevance>400000</relevance>
+<relevance>24750</relevance>
 <recid>content: title building storage networks author farley marc</recid>
 </hit>
 <hit>
 
-<md-title>3D games</md-title>
-<md-title-remainder>real-time rendering and software technology</md-title-remainder>
-<md-date>2001</md-date>
-<md-author>Watt, Alan H</md-author><location id="id_solr" name="LOC (SOLR)">
-<md-title>3D games</md-title>
-<md-title-remainder>real-time rendering and software technology</md-title-remainder>
-<md-date>2001</md-date>
-<md-author>Watt, Alan H</md-author></location>
-<relevance>400000</relevance>
-<recid>content: title d games author watt alan h</recid>
-</hit>
-<hit>
-
-<md-title>Mastering algorithms with C</md-title>
+<md-title>Complete CL</md-title>
+<md-title-remainder>the definitive control language programming guide</md-title-remainder>
 <md-date>1999</md-date>
-<md-author>Loudon, Kyle</md-author>
-<md-description>&quot;Useful techniques from sorting to encryption&quot;--Cover</md-description><location id="id_solr" name="LOC (SOLR)">
-<md-title>Mastering algorithms with C</md-title>
+<md-author>Malaga, Ernie</md-author>
+<md-description>Includes index</md-description><location id="id_solr" name="LOC (SOLR)">
+<md-title>Complete CL</md-title>
+<md-title-remainder>the definitive control language programming guide</md-title-remainder>
 <md-date>1999</md-date>
-<md-author>Loudon, Kyle</md-author>
-<md-description>&quot;Useful techniques from sorting to encryption&quot;--Cover</md-description>
+<md-author>Malaga, Ernie</md-author>
 <md-description>Includes index</md-description></location>
-<relevance>400000</relevance>
-<recid>content: title mastering algorithms with c author loudon kyle</recid>
-</hit>
-<hit>
-
-<md-title>Oracle8i Java component programming with EJB, CORBA, and JSP</md-title>
-<md-date>2000</md-date>
-<md-author>Morisseau-Leroy, Nirva</md-author>
-<md-description>CD-ROM includes resources mentioned in the book, electronic versions of the appendices, plus sample JSP &amp; servlet programs</md-description><location id="id_solr" name="LOC (SOLR)">
-<md-title>Oracle8i Java component programming with EJB, CORBA, and JSP</md-title>
-<md-date>2000</md-date>
-<md-author>Morisseau-Leroy, Nirva</md-author>
-<md-description>&quot;Covers Oracle database releases 8.1.5, 8.1.6, and 8.1.7.&quot;</md-description>
-<md-description>CD-ROM includes resources mentioned in the book, electronic versions of the appendices, plus sample JSP &amp; servlet programs</md-description></location>
-<relevance>400000</relevance>
-<recid>content: title oracle i java component programming with ejb corba and jsp author morisseau leroy nirva</recid>
-</hit>
-<hit>
-
-<md-title>Oracle SQL*Plus</md-title>
-<md-title-remainder>pocket reference</md-title-remainder>
-<md-date>2000</md-date>
-<md-author>Gennick, Jonathan</md-author>
-<md-description>&quot;Guide to SQL*Plus syntax&quot;--cover</md-description><location id="id_solr" name="LOC (SOLR)">
-<md-title>Oracle SQL*Plus</md-title>
-<md-title-remainder>pocket reference</md-title-remainder>
-<md-date>2000</md-date>
-<md-author>Gennick, Jonathan</md-author>
-<md-description>&quot;Covers Oracle8i&quot;--cover</md-description>
-<md-description>&quot;Guide to SQL*Plus syntax&quot;--cover</md-description></location>
-<relevance>400000</relevance>
-<recid>content: title oracle sql plus author gennick jonathan</recid>
-</hit>
-<hit>
-
-<md-title>Programming Web graphics with PERL and GNU software</md-title>
-<md-date>1999</md-date>
-<md-author>Wallace, Shawn P</md-author><location id="id_solr" name="LOC (SOLR)">
-<md-title>Programming Web graphics with PERL and GNU software</md-title>
-<md-date>1999</md-date>
-<md-author>Wallace, Shawn P</md-author></location>
-<relevance>400000</relevance>
-<recid>content: title programming web graphics with perl and gnu software author wallace shawn p</recid>
+<relevance>24750</relevance>
+<recid>content: title complete cl author malaga ernie</recid>
 </hit>
 </show>
\ No newline at end of file