Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/pazpar2
authorDennis Schafroth <dennis@indexdata.com>
Tue, 25 Oct 2011 11:03:02 +0000 (13:03 +0200)
committerDennis Schafroth <dennis@indexdata.com>
Tue, 25 Oct 2011 11:03:02 +0000 (13:03 +0200)
94 files changed:
NEWS
configure.ac
debian/control
doc/pazpar2_conf.xml
doc/pazpar2_protocol.xml
etc/cf.xsl
etc/default.xml
pazpar2.spec
src/Makefile.am
src/client.c
src/client.h
src/connection.c
src/database.c
src/database.h
src/getaddrinfo.c [deleted file]
src/host.h
src/http.c
src/http_command.c
src/pazpar2.c
src/pazpar2_config.c
src/pazpar2_config.h
src/pazpar2_play.c
src/reclists.c
src/reclists.h
src/record.c
src/record.h
src/session.c
src/session.h
src/settings.c
src/settings.h
test/Makefile.am
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_23.res
test/test_facets_24.res
test/test_facets_4.res
test/test_facets_6.res
test/test_facets_9.res
test/test_http.urls
test/test_http_10.res
test/test_http_11.res
test/test_http_13.res
test/test_http_14.res
test/test_http_18.res
test/test_http_23.res
test/test_http_28.res
test/test_http_32.res
test/test_http_36.res
test/test_http_41.res
test/test_http_42.res
test/test_http_45.res
test/test_http_49.res
test/test_http_5.res
test/test_http_50.res
test/test_http_55.res
test/test_http_57.res
test/test_http_6.res
test/test_http_60.res
test/test_http_63.res
test/test_http_8.res
test/test_http_9.res
test/test_icu_10.res
test/test_icu_4.res
test/test_icu_5.res
test/test_icu_6.res
test/test_icu_7.res
test/test_icu_8.res
test/test_icu_9.res
test/test_post_10.res
test/test_post_8.res
test/test_post_9.res
test/test_solr.urls
test/test_solr_4.res
test/test_solr_5.res
test/test_turbomarcxml_4.res
test/test_turbomarcxml_7.res
test/test_url.cfg [new file with mode: 0644]
test/test_url.sh [new file with mode: 0755]
test/test_url.urls [new file with mode: 0644]
test/test_url_1.res [new file with mode: 0644]
test/test_url_10.res [new file with mode: 0644]
test/test_url_2.res [new file with mode: 0644]
test/test_url_3.res [new file with mode: 0644]
test/test_url_4.res [new file with mode: 0644]
test/test_url_5.res [new file with mode: 0644]
test/test_url_6.res [new file with mode: 0644]
test/test_url_7.res [new file with mode: 0644]
test/test_url_8.res [new file with mode: 0644]
test/test_url_9.res [new file with mode: 0644]
win/makefile

diff --git a/NEWS b/NEWS
index 142f08e..083d60a 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,15 @@
+
+New pz:sortmap:field setting for specifying hints on how to make
+a target natively sort on a field. This is used for command=show in
+conjunction with sort.
+
+New pz:url setting for specifying the actual URL for a target. When
+this is used the target ID is not used as URL anymore and the target ID
+may be almost any string (not including []).
+
+command=termlist without name parameter returns all termlists/facets.
+Previously if name parameter was omitted, only "subject" was returned.
+
 --- 1.6.3 2011/09/22
 
 Make termlist sorting stable. Terms with same frequency are now sorted by
index 80ef5e8..500a801 100644 (file)
@@ -22,7 +22,7 @@ AC_LANG(C)
 
 AC_C_INLINE
 
-YAZ_INIT([static icu],[4.2.16])
+YAZ_INIT([static icu],[4.2.17])
 if test -z "$YAZLIB"; then
        AC_MSG_ERROR([YAZ development libraries missing])
 fi
index 94cdd50..1e8ef4a 100644 (file)
@@ -2,7 +2,11 @@ Source: pazpar2
 Section: net
 Priority: extra
 Maintainer: Adam Dickmeiss <adam@indexdata.dk>
-Build-Depends: debhelper (>= 5), autotools-dev, libyaz4-dev (>= 4.2.0), docbook-xsl, libgnutls-dev
+Build-Depends: debhelper (>= 5),
+       autotools-dev,
+       libyaz4-dev (>= 4.2.17),
+       docbook-xsl,
+       libgnutls-dev
 Standards-Version: 3.7.2
 
 Package: pazpar2
index ef4cdb9..e558c65 100644 (file)
        multiple overlapping settings with the same name and target
        value, the 'precedence' attribute determines what happens.
       </para>
+      <para>
+       For Pazpar2 1.6.4 or later, the target ID may be user-defined, in
+       which case, the actual host, port, etc is given by setting
+       <xref linkend="pzurl"/>.
+      </para>
      </listitem>
     </varlistentry>
     <varlistentry>
       </note>
      </listitem>
     </varlistentry>
+
+    <varlistentry id="pzurl">
+     <term>pz:url</term>
+     <listitem>
+      <para>
+       Specifies URL for the target and overrides the target ID.
+      </para>
+      <note>
+       <para>
+       <literal>pz:url</literal> is only recognized for
+       Pazpar2 1.6.4 and later.
+       </para>
+      </note>
+     </listitem>
+    </varlistentry>
+
+    <varlistentry id="pzsortmap">
+     <term>pz:sortmap:<replaceable>field</replaceable></term>
+     <listitem>
+      <para>
+       Specifies native sorting for a target where
+       <replaceable>field</replaceable> is a sort criteria (see command
+       show). The value has to components separated by colon: strategy and
+       native-field. Strategy is one of <literal>z3950</literal>,
+       <literal>type7</literal>, <literal>cql</literal>,
+       <literal>sru11</literal>, or <literal>embed</literal>.
+       The second component, native-field, is the field that is recognized
+       by the target.
+      </para>
+      <note>
+       <para>
+       Only supported for Pazpar2 1.6.4 and later.
+       </para>
+      </note>
+     </listitem>
+    </varlistentry>
     
    </variablelist>
-
+   
   </refsect2>
 
  </refsect1>
index 80aed16..47314ac 100644 (file)
@@ -188,13 +188,16 @@ search.pz?command=settings&session=2044502273&pz:allow[search.com:210/db1]=1
        <para>
        Limits the search to a given set of targets specified by the
        filter. The filter consists a comma separated list of
-       setting+operator+args pairs. The setting is a Pazpar2 setting
+       <emphasis>setting</emphasis>+<emphasis>operator</emphasis>+<emphasis>args</emphasis>
+       pairs. The <emphasis>setting</emphasis> is a Pazpar2 setting
        (such as <literal>pz:id</literal>).
-       The operator is either = (string match)
-       or ~ (substring match). The args is a list of values separated
-       by | (or , one of the values). The idea is that only targets
-       with a setting matching one of the values given will be included
-       in the search.
+       The <emphasis>operator</emphasis> is either
+       <literal>=</literal> (string match)
+       or <literal>~</literal> (substring match).
+       The <emphasis>args</emphasis> is a list of values separated
+       by <literal>|</literal> (or , one of the values).
+       The idea is that only targets with a setting matching one of
+       the values given will be included in the search.
        </para>
       </listitem>
      </varlistentry>
@@ -203,9 +206,14 @@ search.pz?command=settings&session=2044502273&pz:allow[search.com:210/db1]=1
       <listitem>
        <para>
        Narrows the search by one or more fields (typically facets).
-       The limit is sequence of one or more name=value pairs separated
-       by comma.
-       A value that contains a comma should be escaped by backslash (\).
+       The limit is sequence of one or more
+       <emphasis>name</emphasis>=<emphasis>args</emphasis> pairs separated
+       by comma. The <emphasis>args</emphasis> is a list of values
+       separated by vertical bar (<literal>|</literal>).
+       The meaning of <literal>|</literal> is alternative, ie OR .
+       A value that contains a comma (<literal>,</literal>),
+       a vertical bar (<literal>|</literal>) or
+       backslash itself must be preceded by backslash (<literal>\</literal>).
        The <link linkend="limitmap">pz:limitmap</link> configuration
        item defines how the searches are mapped to a database.
        </para>
@@ -347,6 +355,11 @@ search.pz2?session=2044502273&command=stat
         in the pazpar2.cfg file, or the special names 'relevance' and
        'position'.
        </para>
+       <para>
+       For targets where If <link linkend="pz:sortmap">pz:sortmap</link>
+       is defined, a sort operation will be executed (possibly including
+       extending the search).
+       </para>
       </listitem>
      </varlistentry>
      
@@ -506,7 +519,8 @@ search.pz2?session=605047297&command=record&id=3
       <term>name</term>
       <listitem>
        <para>
-       comma-separated list of termlist names (default "subject")
+       comma-separated list of termlist names. If omitted,
+       all termlists are returned.
        </para>
       </listitem>
      </varlistentry>
index 1c3c053..ec4615f 100644 (file)
     </pz:metadata>
   </xsl:template>
 
+  <xsl:template match="id">
+    <pz:metadata type="id">
+      <xsl:value-of select="."/>
+    </pz:metadata>
+  </xsl:template>
+
   <xsl:template match="text()"/>
 
 </xsl:stylesheet>
index 6dc9cae..5a9b299 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <service  xmlns="http://www.indexdata.com/pazpar2/1.0">
   <timeout session="60" z3950_operation="30" z3950_session="180"/>
-  <settings src="settings/sru-test.xml"/>
+  <settings src="settings/testserver.xml"/>
   
   <icu_chain id="relevance" locale="en">
     <transform rule="[:Control:] Any-Remove"/>
index 998df6b..ec20f87 100644 (file)
@@ -7,11 +7,11 @@ Group: Applications/Internet
 Vendor: Index Data ApS <info@indexdata.dk>
 Source: pazpar2-%{version}.tar.gz
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
-BuildRequires: libyaz4-devel >= 4.2.0
+BuildRequires: libyaz4-devel >= 4.2.17
 Packager: Adam Dickmeiss <adam@indexdata.dk>
 URL: http://www.indexdata.com/pazpar2
 Summary: pazpar2 daemon
-Requires: libyaz4
+Requires: libyaz4 >= 4.2.17
 
 %description
 Pazpar2 is a high-performance, user interface-independent, data
index 5d69f20..2f3643d 100644 (file)
@@ -22,7 +22,6 @@ libpazpar2_a_SOURCES = \
        database.c database.h \
        eventl.c eventl.h \
        facet_limit.c facet_limit.h \
-       getaddrinfo.c \
        host.h \
        http.c http.h http_command.c \
        incref.c incref.h \
index 308364d..39190c0 100644 (file)
@@ -119,8 +119,7 @@ struct client {
     ZOOM_resultset resultset;
     YAZ_MUTEX mutex;
     int ref_count;
-    /* copy of database->url */
-    char *url;
+    char *id;
 };
 
 struct show_raw {
@@ -167,7 +166,8 @@ void client_set_state(struct client *cl, enum client_state st)
     {
 
         int no_active = session_active_clients(cl->session);
-        yaz_log(YLOG_DEBUG, "%s: releasing watches on zero active: %d", client_get_url(cl), no_active);
+        yaz_log(YLOG_DEBUG, "%s: releasing watches on zero active: %d",
+                client_get_id(cl), no_active);
         if (no_active == 0) {
             session_alert_watch(cl->session, SESSION_WATCH_SHOW);
             session_alert_watch(cl->session, SESSION_WATCH_SHOW_PREF);
@@ -347,7 +347,7 @@ static void client_send_raw_present(struct client *cl)
     assert(set);
 
     yaz_log(YLOG_DEBUG, "%s: trying to present %d record(s) from %d",
-            client_get_url(cl), 1, offset);
+            client_get_id(cl), 1, offset);
 
     if (cl->show_raw->syntax)
         syntax = cl->show_raw->syntax;
@@ -484,7 +484,7 @@ static void ingest_raw_record(struct client *cl, ZOOM_record rec)
 void client_check_preferred_watch(struct client *cl)
 {
     struct session *se = cl->session;
-    yaz_log(YLOG_DEBUG, "client_check_preferred_watch: %s ", client_get_url(cl));
+    yaz_log(YLOG_DEBUG, "client_check_preferred_watch: %s ", client_get_id(cl));
     if (se)
     {
         client_unlock(cl);
@@ -498,14 +498,13 @@ void client_check_preferred_watch(struct client *cl)
         client_lock(cl);
     }
     else
-        yaz_log(YLOG_WARN, "client_check_preferred_watch: %s. No session!", client_get_url(cl));
+        yaz_log(YLOG_WARN, "client_check_preferred_watch: %s. No session!", client_get_id(cl));
 
 }
 
 void client_search_response(struct client *cl)
 {
     struct connection *co = cl->connection;
-    struct session *se = cl->session;
     ZOOM_connection link = connection_get_link(co);
     ZOOM_resultset resultset = cl->resultset;
 
@@ -516,7 +515,7 @@ void client_search_response(struct client *cl)
         cl->hits = 0;
         client_set_state(cl, Client_Error);
         yaz_log(YLOG_WARN, "Search error %s (%s): %s",
-                error, addinfo, client_get_url(cl));
+                error, addinfo, client_get_id(cl));
     }
     else
     {
@@ -525,11 +524,6 @@ void client_search_response(struct client *cl)
         client_report_facets(cl, resultset);
         cl->record_offset = cl->startrecs;
         cl->hits = ZOOM_resultset_size(resultset);
-        if (se) {
-            se->total_hits += cl->hits;
-            yaz_log(YLOG_DEBUG, "client_search_response: total hits "
-                    ODR_INT_PRINTF, se->total_hits);
-        }
     }
 }
 
@@ -556,7 +550,7 @@ void client_record_response(struct client *cl)
     {
         client_set_state(cl, Client_Error);
         yaz_log(YLOG_WARN, "Search error %s (%s): %s",
-            error, addinfo, client_get_url(cl));
+            error, addinfo, client_get_id(cl));
     }
     else
     {
@@ -588,7 +582,7 @@ void client_record_response(struct client *cl)
                 else if (ZOOM_record_error(rec, &msg, &addinfo, 0))
                 {
                     yaz_log(YLOG_WARN, "Record error %s (%s): %s (rec #%d)",
-                            msg, addinfo, client_get_url(cl),
+                            msg, addinfo, client_get_id(cl),
                             cl->record_offset);
                 }
                 else
@@ -603,12 +597,12 @@ void client_record_response(struct client *cl)
                     xmlrec = ZOOM_record_get(rec, type, NULL);
                     if (!xmlrec)
                         yaz_log(YLOG_WARN, "ZOOM_record_get failed from %s",
-                                client_get_url(cl));
+                                client_get_id(cl));
                     else
                     {
                         /* OK = 0, -1 = failure, -2 = Filtered */
                         if (ingest_record(cl, xmlrec, cl->record_offset, nmem) == -1)
-                            yaz_log(YLOG_WARN, "Failed to ingest from %s", client_get_url(cl));
+                            yaz_log(YLOG_WARN, "Failed to ingest from %s", client_get_id(cl));
                     }
                     nmem_destroy(nmem);
                 }
@@ -665,13 +659,13 @@ int client_has_facet(struct client *cl, const char *name)
     return 0;
 }
 
-void client_start_search(struct client *cl)
+void client_start_search(struct client *cl, const char *sort_strategy_and_spec,
+                         int increasing)
 {
     struct session_database *sdb = client_get_database(cl);
     struct connection *co = client_get_connection(cl);
     ZOOM_connection link = connection_get_link(co);
     ZOOM_resultset rs;
-    char *databaseName = sdb->database->databases[0];
     const char *opt_piggyback   = session_setting_oneval(sdb, PZ_PIGGYBACK);
     const char *opt_queryenc    = session_setting_oneval(sdb, PZ_QUERYENCODING);
     const char *opt_elements    = session_setting_oneval(sdb, PZ_ELEMENTS);
@@ -682,10 +676,10 @@ void client_start_search(struct client *cl)
     const char *opt_preferred   = session_setting_oneval(sdb, PZ_PREFERRED);
     const char *extra_args      = session_setting_oneval(sdb, PZ_EXTRA_ARGS);
     char maxrecs_str[24], startrecs_str[24];
+    ZOOM_query q;
 
     assert(link);
 
-    cl->hits = -1;
     cl->record_offset = 0;
     cl->diagnostic = 0;
 
@@ -695,7 +689,8 @@ void client_start_search(struct client *cl)
     if (opt_preferred) {
         cl->preferred = atoi(opt_preferred);
         if (cl->preferred)
-            yaz_log(YLOG_LOG, "Target %s has preferred status: %d", sdb->database->url, cl->preferred);
+            yaz_log(YLOG_LOG, "Target %s has preferred status: %d",
+                    client_get_id(cl), cl->preferred);
     }
     client_set_state(cl, Client_Working);
 
@@ -729,34 +724,52 @@ void client_start_search(struct client *cl)
     sprintf(startrecs_str, "%d", cl->startrecs);
     ZOOM_connection_option_set(link, "start", startrecs_str);
 
-    if (databaseName)
-        ZOOM_connection_option_set(link, "databaseName", databaseName);
-
     /* TODO Verify does it break something for CQL targets(non-SOLR) ? */
     /* facets definition is in PQF */
     client_set_facets_request(cl, link);
 
+    q = ZOOM_query_create();
     if (cl->cqlquery)
     {
-        ZOOM_query q = ZOOM_query_create();
-        yaz_log(YLOG_LOG, "Search %s CQL: %s", sdb->database->url, cl->cqlquery);
+        yaz_log(YLOG_LOG, "Search %s CQL: %s", client_get_id(cl),
+                cl->cqlquery);
         ZOOM_query_cql(q, cl->cqlquery);
         if (*opt_sort)
             ZOOM_query_sortby(q, opt_sort);
-        rs = ZOOM_connection_search(link, q);
-        ZOOM_query_destroy(q);
     }
     else
     {
-        yaz_log(YLOG_LOG, "Search %s PQF: %s", sdb->database->url, cl->pquery);
-        rs = ZOOM_connection_search_pqf(link, cl->pquery);
+        yaz_log(YLOG_LOG, "Search %s PQF: %s", client_get_id(cl), cl->pquery);
+        
+        ZOOM_query_prefix(q, cl->pquery);
+    }
+    if (sort_strategy_and_spec &&
+        strlen(sort_strategy_and_spec) < 40 /* spec below */)
+    {
+        char spec[50], *p;
+        strcpy(spec, sort_strategy_and_spec);
+        p = strchr(spec, ':');
+        if (p)
+        {
+            *p++ = '\0'; /* cut the string in two */
+            while (*p == ' ')
+                p++;
+            if (increasing)
+                strcat(p, " <");
+            else
+                strcat(p, " >");
+            yaz_log(YLOG_LOG, "applying %s %s", spec, p);
+            ZOOM_query_sortby2(q, spec, p);
+        }
     }
+    rs = ZOOM_connection_search(link, q);
+    ZOOM_query_destroy(q);
     ZOOM_resultset_destroy(cl->resultset);
     cl->resultset = rs;
     connection_continue(co);
 }
 
-struct client *client_create(void)
+struct client *client_create(const char *id)
 {
     struct client *cl = xmalloc(sizeof(*cl));
     cl->maxrecs = 100;
@@ -776,7 +789,8 @@ struct client *client_create(void)
     pazpar2_mutex_create(&cl->mutex, "client");
     cl->preferred = 0;
     cl->ref_count = 1;
-    cl->url = 0;
+    assert(id);
+    cl->id = xstrdup(id);
     client_use(1);
     
     return cl;
@@ -796,7 +810,7 @@ void client_incref(struct client *c)
 {
     pazpar2_incref(&c->ref_count, c->mutex);
     yaz_log(YLOG_DEBUG, "client_incref c=%p %s cnt=%d",
-            c, client_get_url(c), c->ref_count);
+            c, client_get_id(c), c->ref_count);
 }
 
 int client_destroy(struct client *c)
@@ -804,14 +818,14 @@ int client_destroy(struct client *c)
     if (c)
     {
         yaz_log(YLOG_DEBUG, "client_destroy c=%p %s cnt=%d",
-                c, client_get_url(c), c->ref_count);
+                c, client_get_id(c), c->ref_count);
         if (!pazpar2_decref(&c->ref_count, c->mutex))
         {
             xfree(c->pquery);
             c->pquery = 0;
             xfree(c->cqlquery);
             c->cqlquery = 0;
-            xfree(c->url);
+            xfree(c->id);
             assert(!c->connection);
 
             if (c->resultset)
@@ -916,10 +930,14 @@ static char *make_solrquery(struct client *cl)
     ODR odr_out = odr_createmem(ODR_ENCODE);
 
     zquery = p_query_rpn(odr_out, cl->pquery);
+    if (zquery == 0) {
+        yaz_log(YLOG_WARN, "Failed to generate RPN from PQF: %s", cl->pquery);
+        return 0;
+    }
     yaz_log(YLOG_LOG, "PQF: %s", cl->pquery);
     if ((status = solr_transform_rpn2solr_wrbuf(sqlt, wrb, zquery)))
     {
-        yaz_log(YLOG_WARN, "Failed to generate SOLR query, code=%d", status);
+        yaz_log(YLOG_WARN, "Failed to generate SOLR query from PQF %s, code=%d", cl->pquery, status);
         r = 0;
     }
     else
@@ -994,7 +1012,7 @@ static void apply_limit(struct session_database *sdb,
         if (!s)
         {
             yaz_log(YLOG_WARN, "Target %s: limit %s used, but no limitmap defined",
-                    (sdb->database ? sdb->database->url : "<no url>"), name);
+                    (sdb->database ? sdb->database->id : "<no id>"), name);
         }
     }
     nmem_destroy(nmem_tmp);
@@ -1017,6 +1035,7 @@ int client_parse_query(struct client *cl, const char *query,
     if (!ccl_map)
         return -1;
 
+    cl->hits = -1;
     w_ccl = wrbuf_alloc();
     wrbuf_puts(w_ccl, query);
 
@@ -1037,7 +1056,7 @@ int client_parse_query(struct client *cl, const char *query,
         client_set_state(cl, Client_Error);
         session_log(se, YLOG_WARN, "Failed to parse CCL query '%s' for %s",
                     wrbuf_cstr(w_ccl),
-                    client_get_database(cl)->database->url);
+                    client_get_id(cl));
         wrbuf_destroy(w_ccl);
         wrbuf_destroy(w_pqf);
         return -1;
@@ -1126,7 +1145,6 @@ int client_is_active_preferred(struct client *cl)
     return 0;
 }
 
-
 Odr_int client_get_hits(struct client *cl)
 {
     return cl->hits;
@@ -1150,24 +1168,11 @@ 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)
+const char *client_get_id(struct client *cl)
 {
-    return client_get_database(cl)->database->host;
-}
-
-const char *client_get_url(struct client *cl)
-{
-    if (cl->url)
-        return cl->url;
-    else
-        /* This must not happen anymore, as the url is present until destruction of client  */
-        return "NOURL";
+    return cl->id;
 }
 
 void client_set_maxrecs(struct client *cl, int v)
index fcb4c9c..2fb8ada 100644 (file)
@@ -67,7 +67,7 @@ int client_is_our_response(struct client *cl);
 
 void client_continue(struct client *cl);
 
-struct client *client_create(void);
+struct client *client_create(const char *url);
 int client_destroy(struct client *c);
 
 void client_set_connection(struct client *cl, struct connection *con);
@@ -76,7 +76,8 @@ int client_prep_connection(struct client *cl,
                            int operation_timeout, int session_timeout,
                            iochan_man_t iochan,
                            const struct timeval *abstime);
-void client_start_search(struct client *cl);
+void client_start_search(struct client *cl, const char *sort_strategy_and_spec,
+                         int increasing);
 void client_set_session(struct client *cl, struct session *se);
 int client_is_active(struct client *cl);
 int client_is_active_preferred(struct client *cl);
@@ -89,8 +90,7 @@ int client_get_num_records(struct client *cl);
 int client_get_diagnostic(struct client *cl);
 void client_set_diagnostic(struct client *cl, int diagnostic);
 void client_set_database(struct client *cl, struct session_database *db);
-struct host *client_get_host(struct client *cl);
-const char *client_get_url(struct client *cl);
+const char *client_get_id(struct client *cl);
 void client_set_maxrecs(struct client *cl, int v);
 int  client_get_maxrecs(struct client *cl);
 void client_set_startrecs(struct client *cl, int v);
index 0a6f61c..9381b53 100644 (file)
@@ -166,12 +166,12 @@ static void connection_destroy(struct connection *co)
 // Creates a new connection for client, associated with the host of 
 // client's database
 static struct connection *connection_create(struct client *cl,
+                                            struct host *host,
                                             int operation_timeout,
                                             int session_timeout,
                                             iochan_man_t iochan_man)
 {
     struct connection *co;
-    struct host *host = client_get_host(cl);
 
     co = xmalloc(sizeof(*co));
     co->host = host;
@@ -183,8 +183,8 @@ static struct connection *connection_create(struct client *cl,
     co->state = Conn_Resolving;
     co->operation_timeout = operation_timeout;
     co->session_timeout = session_timeout;
-    if (host->ipport)
-        connection_connect(co, iochan_man);
+    
+    connection_connect(co, iochan_man);
 
     yaz_mutex_enter(host->mutex);
     co->next = co->host->connections;
@@ -223,7 +223,7 @@ static void non_block_events(struct connection *co)
                 if ((err = ZOOM_connection_error(link, &error, &addinfo)))
                 {
                     yaz_log(YLOG_LOG, "Error %s from %s",
-                            error, client_get_url(cl));
+                            error, client_get_id(cl));
                     client_set_diagnostic(cl, err);
                     client_set_state(cl, Client_Error);
                 }
@@ -248,7 +248,7 @@ static void non_block_events(struct connection *co)
         case ZOOM_EVENT_RECV_APDU:
             break;
         case ZOOM_EVENT_CONNECT:
-            yaz_log(YLOG_LOG, "Connected to %s", client_get_url(cl));
+            yaz_log(YLOG_LOG, "Connected to %s", client_get_id(cl));
             co->state = Conn_Open;
             break;
         case ZOOM_EVENT_RECV_SEARCH:
@@ -260,7 +260,7 @@ static void non_block_events(struct connection *co)
             break;
         default:
             yaz_log(YLOG_LOG, "Unhandled event (%d) from %s",
-                    ev, client_get_url(cl));
+                    ev, client_get_id(cl));
         }
     }
     if (got_records)
@@ -305,7 +305,7 @@ static void connection_handler(IOCHAN iochan, int event)
     {
         if (co->state == Conn_Connecting)
         {
-            yaz_log(YLOG_WARN, "%p connect timeout %s", co, client_get_url(cl));
+            yaz_log(YLOG_WARN, "%p connect timeout %s", co, client_get_id(cl));
 
             client_set_state(cl, Client_Error);
             remove_connection_from_host(co);
@@ -314,7 +314,7 @@ static void connection_handler(IOCHAN iochan, int event)
         }
         else
         {
-            yaz_log(YLOG_LOG,  "%p Connection idle timeout %s", co, client_get_url(cl));
+            yaz_log(YLOG_LOG,  "%p Connection idle timeout %s", co, client_get_id(cl));
             remove_connection_from_host(co);
             yaz_mutex_leave(host->mutex);
             connection_destroy(co);
@@ -352,50 +352,6 @@ static void connection_release(struct connection *co)
     co->client = 0;
 }
 
-void connect_resolver_host(struct host *host, iochan_man_t iochan_man)
-{
-    struct connection *con;
-
-start:
-    yaz_mutex_enter(host->mutex);
-    con = host->connections;
-    while (con)
-    {
-        if (con->state == Conn_Resolving)
-        {
-            if (!host->ipport) /* unresolved */
-            {
-                remove_connection_from_host(con);
-                yaz_mutex_leave(host->mutex);
-                connection_destroy(con);
-                goto start;
-                /* start all over .. at some point it will be NULL */
-            }
-            else if (!con->client)
-            {
-                remove_connection_from_host(con);
-                yaz_mutex_leave(host->mutex);
-                connection_destroy(con);
-                /* start all over .. at some point it will be NULL */
-                goto start;
-            }
-            else
-            {
-                yaz_mutex_leave(host->mutex);
-                connection_connect(con, iochan_man);
-                client_start_search(con->client);
-                goto start;
-            }
-        }
-        else
-        {
-            yaz_log(YLOG_LOG, "connect_resolver_host: state=%d", con->state);
-            con = con->next;
-        }
-    }
-    yaz_mutex_leave(host->mutex);
-}
-
 static struct host *connection_get_host(struct connection *con)
 {
     return con->host;
@@ -415,7 +371,6 @@ static int connection_connect(struct connection *con, iochan_man_t iochan_man)
     const char *zproxy = session_setting_oneval(sdb, PZ_ZPROXY);
     const char *apdulog = session_setting_oneval(sdb, PZ_APDULOG);
 
-    assert(host->ipport);
     assert(con);
 
     ZOOM_options_set(zoptions, "async", "1");
@@ -454,10 +409,10 @@ static int connection_connect(struct connection *con, iochan_man_t iochan_man)
         strcat(http_hostport, host->hostport);
         ZOOM_connection_connect(link, http_hostport, 0);
     }
-    else if (zproxy && *zproxy)
-        ZOOM_connection_connect(link, host->hostport, 0);        
     else
-        ZOOM_connection_connect(link, host->ipport, 0);
+    {
+        ZOOM_connection_connect(link, host->hostport, 0);
+    }
     
     con->link = link;
     con->iochan = iochan_create(-1, connection_handler, 0, "connection_socket");
@@ -479,20 +434,37 @@ int client_prep_connection(struct client *cl,
                            const struct timeval *abstime)
 {
     struct connection *co;
-    struct host *host = client_get_host(cl);
     struct session_database *sdb = client_get_database(cl);
     const char *zproxy = session_setting_oneval(sdb, PZ_ZPROXY);
+    const char *url = session_setting_oneval(sdb, PZ_URL);
+    struct host *host = 0;
 
     if (zproxy && zproxy[0] == '\0')
         zproxy = 0;
 
-    if (!host)
-        return 0;
+    if (!url || !*url)
+        url = sdb->database->id;
 
-    co = client_get_connection(cl);
+    host = find_host(client_get_session(cl)->service->server->database_hosts,
+                     url);
+
+    yaz_log(YLOG_DEBUG, "client_prep_connection: target=%s url=%s",
+            client_get_id(cl), url);
 
-    yaz_log(YLOG_DEBUG, "Client prep %s", client_get_url(cl));
+    co = client_get_connection(cl);
 
+    if (co)
+    {
+        assert(co->host);
+        if (co->host == host)
+            ;  /* reusing connection. It's ours! */
+        else 
+        {
+            client_incref(cl);
+            connection_release(co);
+            co = 0;
+        }
+    }
     if (!co)
     {
         int max_connections = 0;
@@ -501,7 +473,7 @@ int client_prep_connection(struct client *cl,
                                                PZ_MAX_CONNECTIONS);
         if (v && *v)
             max_connections = atoi(v);
-
+        
         v = session_setting_oneval(client_get_database(cl),
                 PZ_REUSE_CONNECTIONS);
         if (v && *v)
@@ -515,7 +487,8 @@ int client_prep_connection(struct client *cl,
             int num_connections = 0;
             for (co = host->connections; co; co = co->next)
                 num_connections++;
-            if (reuse_connections) {
+            if (reuse_connections)
+            {
                 for (co = host->connections; co; co = co->next)
                 {
                     if (connection_is_idle(co) &&
@@ -546,7 +519,7 @@ int client_prep_connection(struct client *cl,
                     num_connections, max_connections);
             if (yaz_cond_wait(host->cond_ready, host->mutex, abstime))
             {
-                yaz_log(YLOG_LOG, "out of connections %s", client_get_url(cl));
+                yaz_log(YLOG_LOG, "out of connections %s", client_get_id(cl));
                 client_set_state(cl, Client_Error);
                 yaz_mutex_leave(host->mutex);
                 return 0;
@@ -571,9 +544,10 @@ int client_prep_connection(struct client *cl,
         else
         {
             yaz_mutex_leave(host->mutex);
-            co = connection_create(cl, operation_timeout, session_timeout,
+            co = connection_create(cl, host, operation_timeout, session_timeout,
                                    iochan_man);
         }
+        assert(co->host);
     }
 
     if (co && co->link)
index 08359d6..41e0f06 100644 (file)
@@ -21,8 +21,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #include <config.h>
 #endif
 
-#include <libxml/parser.h>
-#include <libxml/tree.h>
 #include <assert.h>
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -38,15 +36,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #include "database.h"
 
 #include <sys/types.h>
-#if HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#if HAVE_NETDB_H
-#include <netdb.h>
-#endif
-#if HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
 
 enum pazpar2_database_criterion_type {
     PAZPAR2_STRING_MATCH,
@@ -65,29 +54,25 @@ struct database_criterion {
     struct database_criterion *next;
 };
 
-
 struct database_hosts {
     struct host *hosts;
     YAZ_MUTEX mutex;
 };
 
 // Create a new host structure for hostport
-static struct host *create_host(const char *hostport, iochan_man_t iochan_man)
+static struct host *create_host(const char *hostport)
 {
     struct host *host;
+    char *db_comment;
 
     host = xmalloc(sizeof(struct host));
     host->hostport = xstrdup(hostport);
+    db_comment = strchr(host->hostport, '#');
+    if (db_comment)
+        *db_comment = '\0';
     host->connections = 0;
-    host->ipport = 0;
     host->mutex = 0;
 
-    if (host_getaddrinfo(host, iochan_man))
-    {
-        xfree(host->hostport);
-        xfree(host);
-        return 0;
-    }
     pazpar2_mutex_create(&host->mutex, "host");
 
     yaz_cond_create(&host->cond_ready);
@@ -95,8 +80,7 @@ static struct host *create_host(const char *hostport, iochan_man_t iochan_man)
     return host;
 }
 
-static struct host *find_host(database_hosts_t hosts,
-                              const char *hostport, iochan_man_t iochan_man)
+struct host *find_host(database_hosts_t hosts, const char *hostport)
 {
     struct host *p;
     yaz_mutex_enter(hosts->mutex);
@@ -105,7 +89,7 @@ static struct host *find_host(database_hosts_t hosts,
             break;
     if (!p)
     {
-        p = create_host(hostport, iochan_man);
+        p = create_host(hostport);
         if (p)
         {
             p->next = hosts->hosts;
@@ -116,97 +100,44 @@ static struct host *find_host(database_hosts_t hosts,
     return p;
 }
 
-int resolve_database(struct conf_service *service, struct database *db)
-{
-    if (db->host == 0)
-    {
-        struct host *host;
-        char *p;
-        char hostport[256];
-        strcpy(hostport, db->url);
-        if ((p = strchr(hostport, '/')))
-            *p = '\0';
-        if (!(host = find_host(service->server->database_hosts,
-                               hostport, service->server->iochan_man)))
-            return -1;
-        db->host = host;
-    }
-    return 0;
-}
-
-void resolve_databases(struct conf_service *service)
-{
-    struct database *db = service->databases;
-    for (; db; db = db->next)
-        resolve_database(service, db);
-}
-
 struct database *new_database(const char *id, NMEM nmem)
 {
     struct database *db;
-    char hostport[256];
-    char *dbname;
-    char *db_comment;
     struct setting *idset;
 
-    if (strlen(id) > 255)
-        return 0;
-    strcpy(hostport, id);
-    if ((dbname = strchr(hostport, '/')))
-        *(dbname++) = '\0';
-    else
-        dbname = "";
-    db_comment = strchr(dbname, '#');
-    if (db_comment)
-        *db_comment = '\0';
     db = nmem_malloc(nmem, sizeof(*db));
-    memset(db, 0, sizeof(*db));
-    db->host = 0;
-    db->url = nmem_strdup(nmem, id);
-    db->databases = nmem_malloc(nmem, 2 * sizeof(char *));
-    db->databases[0] = nmem_strdup(nmem, dbname);
-    db->databases[1] = 0;
-    db->errors = 0;
-    db->explain = 0;
-
+    db->id = nmem_strdup(nmem, id);
     db->num_settings = PZ_MAX_EOF;
     db->settings = nmem_malloc(nmem, sizeof(struct settings*) * 
                                db->num_settings);
+    db->next = 0;
     memset(db->settings, 0, sizeof(struct settings*) * db->num_settings);
     idset = nmem_malloc(nmem, sizeof(*idset));
     idset->precedence = 0;
     idset->name = "pz:id";
-    idset->target = idset->value = db->url;
+    idset->target = idset->value = db->id;
     idset->next = 0;
     db->settings[PZ_ID] = idset;
-    db->next = 0;
-
-    return db;
-}
-
-static struct database *load_database(const char *id,
-                                      struct conf_service *service)
-{
-    struct database *db;
-    struct zr_explain *explain = 0;
-
-    db = new_database(id, service->nmem);
-    db->explain = explain;
-    db->next = service->databases;
-    service->databases = db;
 
     return db;
 }
 
 // Return a database structure by ID. Load and add to list if necessary
 // new==1 just means we know it's not in the list
-struct database *find_database(const char *id, struct conf_service *service)
+struct database *create_database_for_service(const char *id,
+                                             struct conf_service *service)
 {
     struct database *p;
     for (p = service->databases; p; p = p->next)
-        if (!strcmp(p->url, id))
+        if (!strcmp(p->id, id))
             return p;
-    return load_database(id, service);
+    
+    p = new_database(id, service->nmem);
+    
+    p->next = service->databases;
+    service->databases = p;
+
+    return p;
 }
 
 // This whole session_grep database thing should be moved elsewhere
@@ -344,7 +275,7 @@ static int database_match_criteria(struct setting **settings,
 // Cycles through databases, calling a handler function on the ones for
 // which all criteria matched.
 int session_grep_databases(struct session *se, const char *filter,
-                           void (*fun)(void *context, struct session_database *db))
+                           void (*fun)(struct session *se, struct session_database *db))
 {
     struct session_database *p;
     NMEM nmem = nmem_create();
@@ -401,7 +332,6 @@ void database_hosts_destroy(database_hosts_t *pp)
             struct host *p_next = p->next;
             yaz_mutex_destroy(&p->mutex);
             yaz_cond_destroy(&p->cond_ready);
-            xfree(p->ipport);
             xfree(p->hostport);
             xfree(p);
             p = p_next;
index 22df499..1394732 100644 (file)
@@ -24,15 +24,18 @@ typedef struct database_hosts *database_hosts_t;
 struct session_database;
 struct session;
 struct conf_service;
-struct database *find_database(const char *id, struct conf_service *service);
+struct database *create_database_for_service(const char *id,
+                                            struct conf_service *service);
 int session_grep_databases(struct session *se, const char *filter,
-        void (*fun)(void *context, struct session_database *db));
+        void (*fun)(struct session *se, struct session_database *db));
 int predef_grep_databases(void *context, struct conf_service *service,
                          void (*fun)(void *context, struct database *db));
 int match_zurl(const char *zurl, const char *pattern);
-int resolve_database(struct conf_service *service, struct database *db);
 struct database *new_database(const char *id, NMEM nmem);
 
 database_hosts_t database_hosts_create(void);
 void database_hosts_destroy(database_hosts_t *);
+
+struct host *find_host(database_hosts_t hosts, const char *hostport);
+
 #endif
diff --git a/src/getaddrinfo.c b/src/getaddrinfo.c
deleted file mode 100644 (file)
index 52a489f..0000000
+++ /dev/null
@@ -1,227 +0,0 @@
-/* This file is part of Pazpar2.
-   Copyright (C) 2006-2011 Index Data
-
-Pazpar2 is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-Pazpar2 is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-
-*/
-
-#if HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "sel_thread.h"
-
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#include <stdlib.h>
-
-#include <assert.h>
-#include <sys/types.h>
-#if HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef WIN32
-#include <winsock.h>
-#endif
-#if HAVE_NETDB_H
-#include <netdb.h>
-#endif
-#if HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-
-#include <yaz/log.h>
-#include <yaz/nmem.h>
-#include <yaz/tcpip.h>
-
-#include "session.h"
-#include "connection.h"
-#include "host.h"
-
-/* Only use a threaded resolver on Unix that offers getaddrinfo.
-   gethostbyname is NOT reentrant.
- */
-#if HAVE_GETADDRINFO
-#ifndef WIN32
-#define USE_THREADED_RESOLVER 1
-#endif
-#endif
-
-struct work {
-    char *hostport;  /* hostport to be resolved in separate thread */
-    char *ipport;    /* result or NULL if it could not be resolved */
-    struct host *host; /* host that we're dealing with - mother thread */
-    iochan_man_t iochan_man; /* iochan manager */
-};
-
-static int log_level = YLOG_LOG;
-
-void perform_getaddrinfo(struct work *w)
-{
-    int res = 0;
-    char *port;
-#if HAVE_GETADDRINFO
-    struct addrinfo *addrinfo, hints;
-#else
-    struct hostent *hp;
-#endif
-    char *hostport = xstrdup(w->hostport);
-    
-    if ((port = strchr(hostport, ':')))
-        *(port++) = '\0';
-    else
-        port = "210";
-
-#if HAVE_GETADDRINFO
-    hints.ai_flags = 0;
-    hints.ai_family = PF_INET;
-    hints.ai_socktype = SOCK_STREAM;
-    hints.ai_protocol = IPPROTO_TCP;
-    hints.ai_addrlen = 0;
-    hints.ai_addr = 0;
-    hints.ai_canonname = 0;
-    hints.ai_next = 0;
-    // This is not robust code. It assumes that getaddrinfo always
-    // returns AF_INET address.
-    if ((res = getaddrinfo(hostport, port, &hints, &addrinfo)))
-    {
-        yaz_log(YLOG_WARN, "Failed to resolve %s: %s", 
-                w->hostport, gai_strerror(res));
-    }
-    else
-    {
-        char ipport[128];
-        unsigned char addrbuf[4];
-        assert(addrinfo->ai_family == PF_INET);
-        memcpy(addrbuf, 
-               &((struct sockaddr_in*)addrinfo->ai_addr)->sin_addr.s_addr, 4);
-        sprintf(ipport, "%u.%u.%u.%u:%s",
-                addrbuf[0], addrbuf[1], addrbuf[2], addrbuf[3], port);
-        freeaddrinfo(addrinfo);
-        w->ipport = xstrdup(ipport);
-        yaz_log(log_level, "Resolved %s -> %s", hostport, ipport);
-    }
-#else
-    hp = gethostbyname(hostport);
-    if (!hp)
-    {
-        yaz_log(YLOG_WARN|YLOG_ERRNO, "Failed to resolve %s", hostport);
-    }
-    else
-    {
-        char ipport[128];
-        unsigned char addrbuf[4];
-
-        memcpy(addrbuf, *hp->h_addr_list, 4 * sizeof(unsigned char));
-        sprintf(ipport, "%u.%u.%u.%u:%s",
-                addrbuf[0], addrbuf[1], addrbuf[2], addrbuf[3], port);
-        w->ipport = xstrdup(ipport);
-        yaz_log(log_level, "Resolved %s -> %s", hostport, ipport);
-    }
-#endif
-    xfree(hostport);
-}
-
-static void work_handler(void *vp)
-{
-    struct work *w = vp;
-
-    int sec = 0;  /* >0 for debugging/testing purposes */
-    if (sec)
-    {
-        yaz_log(log_level, "waiting %d seconds", sec);
-#if HAVE_UNISTD_H
-        sleep(sec);
-#endif
-    }
-    perform_getaddrinfo(w);
-}
-
-#if USE_THREADED_RESOLVER
-void iochan_handler(struct iochan *i, int event)
-{
-    sel_thread_t p = iochan_getdata(i);
-
-    if (event & EVENT_INPUT)
-    {
-        struct work *w = sel_thread_result(p);
-        w->host->ipport = w->ipport;
-        connect_resolver_host(w->host, w->iochan_man);
-        xfree(w);
-    }
-}
-
-static sel_thread_t resolver_thread = 0;
-
-static void getaddrinfo_start(iochan_man_t iochan_man)
-{
-    int fd;
-    sel_thread_t p = resolver_thread = 
-        sel_thread_create(work_handler, 0 /* work_destroy */, &fd,
-                          3 /* no of resolver threads */);
-    if (!p)
-    {
-        yaz_log(YLOG_FATAL|YLOG_ERRNO, "sel_create_create failed");
-        exit(1);
-    }
-    else
-    {
-        IOCHAN chan = iochan_create(fd, iochan_handler, EVENT_INPUT,
-            "getaddrinfo_socket");
-        iochan_setdata(chan, p);
-        iochan_add(iochan_man, chan);
-    }
-    yaz_log(log_level, "resolver start");
-    resolver_thread = p;
-}
-#endif
-
-int host_getaddrinfo(struct host *host, iochan_man_t iochan_man)
-{
-    struct work *w = xmalloc(sizeof(*w));
-    int use_thread = 0; /* =0 to disable threading entirely */
-
-    w->hostport = host->hostport;
-    w->ipport = 0;
-    w->host = host;
-    w->iochan_man = iochan_man;
-#if USE_THREADED_RESOLVER
-    if (use_thread)
-    {
-        if (resolver_thread == 0)
-            getaddrinfo_start(iochan_man);
-        assert(resolver_thread);
-        sel_thread_add(resolver_thread, w);
-        return 0;
-    }
-#endif
-    perform_getaddrinfo(w);
-    host->ipport = w->ipport;
-    xfree(w);
-    if (!host->ipport)
-        return -1;
-    return 0;
-}
-
-/*
- * Local variables:
- * c-basic-offset: 4
- * c-file-style: "Stroustrup"
- * indent-tabs-mode: nil
- * End:
- * vim: shiftwidth=4 tabstop=8 expandtab
- */
-
index 4ab7fe8..752ca09 100644 (file)
@@ -25,7 +25,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 /** \brief Represents a host (irrespective of databases) */
 struct host {
     char *hostport;
-    char *ipport;
     struct connection *connections; // All connections to this
     struct host *next;
     YAZ_MUTEX mutex;
index c9cca1d..ef88f17 100644 (file)
@@ -889,7 +889,7 @@ static void http_io(IOCHAN i, int event)
                 {
                     struct timeval tv;
                     gettimeofday(&tv, 0);
-                    fprintf(hc->http_server->record_file, "%lld %lld %lld 0\n",
+                    fprintf(hc->http_server->record_file, "r %lld %lld %lld 0\n",
                             (long long) tv.tv_sec, (long long) tv.tv_usec,
                             (long long) iochan_getfd(i));
                 }
@@ -921,11 +921,12 @@ static void http_io(IOCHAN i, int event)
                     for (hb = hc->iqueue; hb; hb = hb->next)
                         sz += hb->len;
                     gettimeofday(&tv, 0);
-                    fprintf(hc->http_server->record_file, "%lld %lld %lld %d\n",
+                    fprintf(hc->http_server->record_file, "r %lld %lld %lld %d\n",
                             (long long) tv.tv_sec, (long long) tv.tv_usec,
                             (long long) iochan_getfd(i), sz);
                     for (hb = hc->iqueue; hb; hb = hb->next)
                         fwrite(hb->buf, 1, hb->len, hc->http_server->record_file);
+                    fflush(hc->http_server->record_file);
                 }
  #endif
                 if (!(hc->request = http_parse_request(hc, &hc->iqueue, reqlen)))
@@ -968,6 +969,21 @@ static void http_io(IOCHAN i, int event)
                 }
                 if (res == wb->len)
                 {
+#if HAVE_SYS_TIME_H
+                    if (hc->http_server->record_file)
+                    {
+                        struct timeval tv;
+                        int sz = wb->offset + wb->len;
+                        gettimeofday(&tv, 0);
+                        fprintf(hc->http_server->record_file, "w %lld %lld %lld %d\n",
+                                (long long) tv.tv_sec, (long long) tv.tv_usec,
+                                (long long) iochan_getfd(i), sz);
+                        fwrite(wb->buf, 1, wb->offset + wb->len,
+                               hc->http_server->record_file);
+                        fputc('\n', hc->http_server->record_file);
+                        fflush(hc->http_server->record_file);
+                    }
+ #endif
                     hc->oqueue = hc->oqueue->next;
                     http_buf_destroy(hc->http_server, wb);
                 }
index b46ba7b..963740f 100644 (file)
@@ -267,6 +267,28 @@ static void error(struct http_response *rs,
     http_send_response(c);
 }
 
+static void response_open_no_status(struct http_channel *c, const char *command)
+{
+    wrbuf_rewind(c->wrbuf);
+    wrbuf_printf(c->wrbuf, "%s<%s>",
+                 HTTP_COMMAND_RESPONSE_PREFIX, command);
+}
+
+static void response_open(struct http_channel *c, const char *command)
+{
+    response_open_no_status(c, command);
+    wrbuf_puts(c->wrbuf, "<status>OK</status>");
+}
+
+static void response_close(struct http_channel *c, const char *command)
+{
+    struct http_response *rs = c->response;
+
+    wrbuf_printf(c->wrbuf, "</%s>", command);
+    rs->payload = nmem_strdup(c->nmem, wrbuf_cstr(c->wrbuf));
+    http_send_response(c);
+}
+
 unsigned int make_sessionid(void)
 {
     static int seq = 0; /* thread pr */
@@ -368,18 +390,15 @@ static int process_settings(struct session *se, struct http_request *rq,
 
 static void cmd_exit(struct http_channel *c)
 {
-    char buf[1024];
-    struct http_response *rs = c->response;
     yaz_log(YLOG_WARN, "exit");
-    sprintf(buf, HTTP_COMMAND_RESPONSE_PREFIX "<exit><status>OK</status></exit>");
-    rs->payload = nmem_strdup(c->nmem, buf);
-    http_send_response(c);
+
+    response_open(c, "exit");
+    response_close(c, "exit");
     http_close_server(c->server);
 }
 
 static void cmd_init(struct http_channel *c)
 {
-    char buf[1024];
     struct http_request *r = c->request;
     const char *clear = http_argbyname(r, "clear");
     const char *content_type = http_lookup_header(r->headers, "Content-Type");
@@ -429,18 +448,18 @@ static void cmd_init(struct http_channel *c)
     
     if (process_settings(s->psession, c->request, c->response) < 0)
         return;
-    
-    sprintf(buf, HTTP_COMMAND_RESPONSE_PREFIX 
-            "<init><status>OK</status><session>%d", sesid);
+
+    response_open(c, "init");
+    wrbuf_printf(c->wrbuf, "<session>%d", sesid);
     if (c->server->server_id)
     {
-        strcat(buf, ".");
-        strcat(buf, c->server->server_id);
+        wrbuf_puts(c->wrbuf, ".");
+        wrbuf_puts(c->wrbuf, c->server->server_id);
     }
-    strcat(buf, "</session>"
-           "<protocol>" PAZPAR2_PROTOCOL_VERSION "</protocol></init>");
-    rs->payload = nmem_strdup(c->nmem, buf);
-    http_send_response(c);
+    wrbuf_puts(c->wrbuf, "</session>"
+               "<protocol>" PAZPAR2_PROTOCOL_VERSION "</protocol>");
+    
+    response_close(c, "init");
 }
 
 static void apply_local_setting(void *client_data,
@@ -484,144 +503,34 @@ static void cmd_settings(struct http_channel *c)
         release_session(c, s);
         return;
     }
-    rs->payload = HTTP_COMMAND_RESPONSE_PREFIX "<settings><status>OK</status></settings>";
-    http_send_response(c);
+    response_open(c, "settings");
+    response_close(c, "settings");
     release_session(c, s);
 }
 
-// Compares two hitsbytarget nodes by hitcount
-static int cmp_ht(const void *p1, const void *p2)
-{
-    const struct hitsbytarget *h1 = p1;
-    const struct hitsbytarget *h2 = p2;
-    return h2->hits - h1->hits;
-}
-
-// This implements functionality somewhat similar to 'bytarget', but in a termlist form
-static int targets_termlist(WRBUF wrbuf, struct session *se, int num,
-                             NMEM nmem)
-{
-    struct hitsbytarget *ht;
-    int count, i;
-
-    ht = hitsbytarget(se, &count, nmem);
-    qsort(ht, count, sizeof(struct hitsbytarget), cmp_ht);
-    for (i = 0; i < count && i < num && ht[i].hits > 0; i++)
-    {
-
-        // do only print terms which have display names
-    
-        wrbuf_puts(wrbuf, "<term>\n");
-
-        wrbuf_puts(wrbuf, "<id>");
-        wrbuf_xmlputs(wrbuf, ht[i].id);
-        wrbuf_puts(wrbuf, "</id>\n");
-        
-        wrbuf_puts(wrbuf, "<name>");
-        if (!ht[i].name || !ht[i].name[0])
-            wrbuf_xmlputs(wrbuf, "NO TARGET NAME");
-        else
-            wrbuf_xmlputs(wrbuf, ht[i].name);
-        wrbuf_puts(wrbuf, "</name>\n");
-        
-        wrbuf_printf(wrbuf, "<frequency>" ODR_INT_PRINTF "</frequency>\n",
-                     ht[i].hits);
-        
-        wrbuf_puts(wrbuf, "<state>");
-        wrbuf_xmlputs(wrbuf, ht[i].state);
-        wrbuf_puts(wrbuf, "</state>\n");
-        
-        wrbuf_printf(wrbuf, "<diagnostic>%d</diagnostic>\n", 
-                     ht[i].diagnostic);
-        wrbuf_puts(wrbuf, "</term>\n");
-    }
-    return count;
-}
-
 static void cmd_termlist(struct http_channel *c)
 {
-    struct http_response *rs = c->response;
     struct http_request *rq = c->request;
     struct http_session *s = locate_session(c);
     const char *name = http_argbyname(rq, "name");
     const char *nums = http_argbyname(rq, "num");
     int num = 15;
     int status;
-    WRBUF debug_log = 0;
 
     if (!s)
         return;
 
     status = session_active_clients(s->psession);
 
-    if (!name)
-        name = "subject";
-    if (strlen(name) > 255)
-        return;
     if (nums)
         num = atoi(nums);
 
-    debug_log = wrbuf_alloc();
+    response_open_no_status(c, "termlist");
+    wrbuf_printf(c->wrbuf, "<activeclients>%d</activeclients>\n", status);
 
-    wrbuf_rewind(c->wrbuf);
+    perform_termlist(c, s->psession, name, num);
 
-    wrbuf_puts(c->wrbuf, "<termlist>\n");
-    wrbuf_printf(c->wrbuf, "<activeclients>%d</activeclients>\n", status);
-    while (*name)
-    {
-        char tname[256];
-        const char *tp;
-
-        if (!(tp = strchr(name, ',')))
-            tp = name + strlen(name);
-        strncpy(tname, name, tp - name);
-        tname[tp - name] = '\0';
-        wrbuf_puts(c->wrbuf, "<list name=\"");
-        wrbuf_xmlputs(c->wrbuf, tname);
-        wrbuf_puts(c->wrbuf, "\">\n");
-        if (!strcmp(tname, "xtargets"))
-        {
-            int targets = targets_termlist(c->wrbuf, s->psession, num, c->nmem);
-            wrbuf_printf(debug_log, " xtargets: %d", targets);
-        }
-        else
-        {
-            int len;
-            struct termlist_score **p = 
-                get_termlist_score(s->psession, tname, &len);
-            if (p && len)
-                wrbuf_printf(debug_log, " %s: %d", tname, len);
-            if (p)
-            {
-                int i;
-                for (i = 0; i < len && i < num; i++)
-                {
-                    // prevnt sending empty term elements
-                    if (!p[i]->display_term || !p[i]->display_term[0])
-                        continue;
-
-                    wrbuf_puts(c->wrbuf, "<term>");
-                    wrbuf_puts(c->wrbuf, "<name>");
-                    wrbuf_xmlputs(c->wrbuf, p[i]->display_term);
-                    wrbuf_puts(c->wrbuf, "</name>");
-                    
-                    wrbuf_printf(c->wrbuf, 
-                                 "<frequency>%d</frequency>", 
-                                 p[i]->frequency);
-                    wrbuf_puts(c->wrbuf, "</term>\n");
-                }
-            }
-        }
-        wrbuf_puts(c->wrbuf, "</list>\n");
-        name = tp;
-        if (*name == ',')
-            name++;
-    }
-    wrbuf_puts(c->wrbuf, "</termlist>\n");
-    yaz_log(YLOG_DEBUG, "termlist response: %s ", wrbuf_cstr(debug_log));
-    wrbuf_destroy(debug_log);
-    rs->payload = nmem_strdup(rq->channel->nmem, wrbuf_cstr(c->wrbuf));
-    http_send_response(c);
+    response_close(c, "termlist");
     release_session(c, s);
 }
 
@@ -638,19 +547,14 @@ static void session_status(struct http_channel *c, struct http_session *s)
 
 static void cmd_session_status(struct http_channel *c)
 {
-    struct http_response *rs = c->response;
     struct http_session *s = locate_session(c);
     if (!s)
         return;
 
-    wrbuf_rewind(c->wrbuf);
-    wrbuf_puts(c->wrbuf, HTTP_COMMAND_RESPONSE_PREFIX "<sessionstatus><status>OK</status>\n");
+    response_open(c, "session-status");
     session_status(c, s);
-    wrbuf_puts(c->wrbuf, "</sessionstatus>\n");
-    rs->payload = nmem_strdup(c->nmem, wrbuf_cstr(c->wrbuf));
-    http_send_response(c);
+    response_close(c, "session-status");
     release_session(c, s);
-
 }
 
 int sessions_count(void);
@@ -663,13 +567,12 @@ int resultsets_count(void);
 
 static void cmd_server_status(struct http_channel *c)
 {
-    struct http_response *rs = c->response;
     int sessions   = sessions_count();
     int clients    = clients_count();
     int resultsets = resultsets_count();
-    wrbuf_rewind(c->wrbuf);
-    wrbuf_puts(c->wrbuf, HTTP_COMMAND_RESPONSE_PREFIX "<server-status>\n");
-    wrbuf_printf(c->wrbuf, "  <sessions>%u</sessions>\n", sessions);
+
+    response_open(c, "server-status");
+    wrbuf_printf(c->wrbuf, "\n  <sessions>%u</sessions>\n", sessions);
     wrbuf_printf(c->wrbuf, "  <clients>%u</clients>\n",   clients);
     /* Only works if yaz has been compiled with enabling of this */
     wrbuf_printf(c->wrbuf, "  <resultsets>%u</resultsets>\n",resultsets);
@@ -693,16 +596,13 @@ static void cmd_server_status(struct http_channel *c)
     }
     yaz_mutex_leave(http_sessions->mutex);
 */
-    wrbuf_puts(c->wrbuf, "</server-status>\n");
-    rs->payload = nmem_strdup(c->nmem, wrbuf_cstr(c->wrbuf));
-    http_send_response(c);
+    response_close(c, "server-status");
     xmalloc_trav(0);
 }
 
 
 static void cmd_bytarget(struct http_channel *c)
 {
-    struct http_response *rs = c->response;
     struct http_request *rq = c->request;
     struct http_session *s = locate_session(c);
     struct hitsbytarget *ht;
@@ -711,9 +611,8 @@ static void cmd_bytarget(struct http_channel *c)
 
     if (!s)
         return;
-    ht = hitsbytarget(s->psession, &count, c->nmem);
-    wrbuf_rewind(c->wrbuf);
-    wrbuf_puts(c->wrbuf, HTTP_COMMAND_RESPONSE_PREFIX "<bytarget><status>OK</status>");
+    ht = get_hitsbytarget(s->psession, &count, c->nmem);
+    response_open(c, "bytarget");
 
     for (i = 0; i < count; i++)
     {
@@ -745,10 +644,7 @@ static void cmd_bytarget(struct http_channel *c)
         }
         wrbuf_puts(c->wrbuf, "</target>");
     }
-
-    wrbuf_puts(c->wrbuf, "</bytarget>");
-    rs->payload = nmem_strdup(c->nmem, wrbuf_cstr(c->wrbuf));
-    http_send_response(c);
+    response_close(c, "bytarget");
     release_session(c, s);
 }
 
@@ -800,7 +696,7 @@ static void write_subrecord(struct record *r, WRBUF w,
         client_get_database(r->client), PZ_NAME);
 
     wrbuf_puts(w, "<location id=\"");
-    wrbuf_xmlputs(w, client_get_database(r->client)->database->url);
+    wrbuf_xmlputs(w, client_get_id(r->client));
     wrbuf_puts(w, "\" ");
 
     wrbuf_puts(w, "name=\"");
@@ -934,8 +830,8 @@ static void cmd_record(struct http_channel *c)
     }
     else
     {
-        wrbuf_puts(c->wrbuf, HTTP_COMMAND_RESPONSE_PREFIX "<record>\n");
-        wrbuf_puts(c->wrbuf, "<recid>");
+        response_open_no_status(c, "record");
+        wrbuf_puts(c->wrbuf, "\n<recid>");
         wrbuf_xmlputs(c->wrbuf, rec->recid);
         wrbuf_puts(c->wrbuf, "</recid>\n");
         if (prev_r)
@@ -955,9 +851,7 @@ static void cmd_record(struct http_channel *c)
         write_metadata(c->wrbuf, service, rec->metadata, 1);
         for (r = rec->records; r; r = r->next)
             write_subrecord(r, c->wrbuf, service, 1);
-        wrbuf_puts(c->wrbuf, "</record>\n");
-        rs->payload = nmem_strdup(c->nmem, wrbuf_cstr(c->wrbuf));
-        http_send_response(c);
+        response_close(c, "record");
     }
     show_single_stop(s->psession, rec);
     release_session(c, s);
@@ -1004,14 +898,14 @@ static void show_records(struct http_channel *c, int active)
         error(rs, PAZPAR2_MALFORMED_PARAMETER_VALUE, "sort");
         release_session(c, s);
         return;
+
     }
 
     
     rl = show_range_start(s->psession, sp, startn, &numn, &total, &total_hits);
 
-    wrbuf_rewind(c->wrbuf);
-    wrbuf_puts(c->wrbuf, HTTP_COMMAND_RESPONSE_PREFIX "<show>\n<status>OK</status>\n");
-    wrbuf_printf(c->wrbuf, "<activeclients>%d</activeclients>\n", active);
+    response_open(c, "show");
+    wrbuf_printf(c->wrbuf, "\n<activeclients>%d</activeclients>\n", active);
     wrbuf_printf(c->wrbuf, "<merged>%d</merged>\n", total);
     wrbuf_printf(c->wrbuf, "<total>" ODR_INT_PRINTF "</total>\n", total_hits);
     wrbuf_printf(c->wrbuf, "<start>%d</start>\n", startn);
@@ -1041,9 +935,7 @@ static void show_records(struct http_channel *c, int active)
 
     show_range_stop(s->psession, rl);
 
-    wrbuf_puts(c->wrbuf, "</show>\n");
-    rs->payload = nmem_strdup(c->nmem, wrbuf_cstr(c->wrbuf));
-    http_send_response(c);
+    response_close(c, "show");
     release_session(c, s);
 }
 
@@ -1059,11 +951,24 @@ static void cmd_show(struct http_channel *c)
     struct http_request *rq = c->request;
     struct http_session *s = locate_session(c);
     const char *block = http_argbyname(rq, "block");
+    const char *sort = http_argbyname(rq, "sort");
+    struct reclist_sortparms *sp;
     int status;
 
     if (!s)
         return;
 
+    if (!sort)
+        sort = "relevance";
+    
+    if (!(sp = reclist_parse_sortparms(c->nmem, sort, s->psession->service)))
+    {
+        error(c->response, PAZPAR2_MALFORMED_PARAMETER_VALUE, "sort");
+        release_session(c, s);
+        return;
+    }
+    session_sort(s->psession, sp->name, sp->increasing);
+
     status = session_active_clients(s->psession);
 
     if (block)
@@ -1081,7 +986,7 @@ static void cmd_show(struct http_channel *c)
             return;
 
         }
-        else if (status && reclist_get_num_records(s->psession->reclist) == 0)
+        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,
@@ -1099,12 +1004,11 @@ static void cmd_show(struct http_channel *c)
 
 static void cmd_ping(struct http_channel *c)
 {
-    struct http_response *rs = c->response;
     struct http_session *s = locate_session(c);
     if (!s)
         return;
-    rs->payload = HTTP_COMMAND_RESPONSE_PREFIX "<ping><status>OK</status></ping>";
-    http_send_response(c);
+    response_open(c, "ping");
+    response_close(c, "ping");
     release_session(c, s);
 }
 
@@ -1135,23 +1039,22 @@ static void cmd_search(struct http_channel *c)
         release_session(c, s);
         return;
     }
-    code = search(s->psession, query, startrecs, maxrecs, filter, limit,
-                  &addinfo);
+    code = session_search(s->psession, query, startrecs, maxrecs, filter, limit,
+                          &addinfo, "relevance", 0);
     if (code)
     {
         error(rs, code, addinfo);
         release_session(c, s);
         return;
     }
-    rs->payload = HTTP_COMMAND_RESPONSE_PREFIX "<search><status>OK</status></search>";
-    http_send_response(c);
+    response_open(c, "search");
+    response_close(c, "search");
     release_session(c, s);
 }
 
 
 static void cmd_stat(struct http_channel *c)
 {
-    struct http_response *rs = c->response;
     struct http_session *s = locate_session(c);
     struct statistics stat;
     int clients;
@@ -1169,8 +1072,7 @@ static void cmd_stat(struct http_channel *c)
        progress = (stat.num_clients  - clients) / (float)stat.num_clients;
     }
 
-    wrbuf_rewind(c->wrbuf);
-    wrbuf_puts(c->wrbuf, HTTP_COMMAND_RESPONSE_PREFIX "<stat>");
+    response_open_no_status(c, "stat");
     wrbuf_printf(c->wrbuf, "<activeclients>%d</activeclients>\n", clients);
     wrbuf_printf(c->wrbuf, "<hits>" ODR_INT_PRINTF "</hits>\n", stat.num_hits);
     wrbuf_printf(c->wrbuf, "<records>%d</records>\n", stat.num_records);
@@ -1182,19 +1084,15 @@ static void cmd_stat(struct http_channel *c)
     wrbuf_printf(c->wrbuf, "<failed>%d</failed>\n", stat.num_failed);
     wrbuf_printf(c->wrbuf, "<error>%d</error>\n", stat.num_error);
     wrbuf_printf(c->wrbuf, "<progress>%.2f</progress>\n", progress);
-    wrbuf_puts(c->wrbuf, "</stat>");
-    rs->payload = nmem_strdup(c->nmem, wrbuf_cstr(c->wrbuf));
-    http_send_response(c);
+    response_close(c, "stat");
     release_session(c, s);
 }
 
 static void cmd_info(struct http_channel *c)
 {
     char yaz_version_str[20];
-    struct http_response *rs = c->response;
 
-    wrbuf_rewind(c->wrbuf);
-    wrbuf_puts(c->wrbuf, HTTP_COMMAND_RESPONSE_PREFIX "<info>\n");
+    response_open_no_status(c, "info");
     wrbuf_puts(c->wrbuf, " <version>\n");
     wrbuf_puts(c->wrbuf, "  <pazpar2");
 #ifdef PAZPAR2_VERSION_SHA1
@@ -1204,7 +1102,6 @@ static void cmd_info(struct http_channel *c)
     wrbuf_xmlputs(c->wrbuf, VERSION);
     wrbuf_puts(c->wrbuf, "</pazpar2>");
 
-
     yaz_version(yaz_version_str, 0);
     wrbuf_puts(c->wrbuf, "  <yaz compiled=\"");
     wrbuf_xmlputs(c->wrbuf, YAZ_VERSION);
@@ -1216,9 +1113,7 @@ static void cmd_info(struct http_channel *c)
     
     info_services(c->server, c->wrbuf);
 
-    wrbuf_puts(c->wrbuf, "</info>");
-    rs->payload = nmem_strdup(c->nmem, wrbuf_cstr(c->wrbuf));
-    http_send_response(c);
+    response_close(c, "info");
 }
 
 struct {
index f51fa9e..585c0f8 100644 (file)
@@ -23,6 +23,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #ifdef WIN32
 #include <winsock.h>
 #endif
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
 
 #include <signal.h>
 #include <assert.h>
index b766b7f..c6567bd 100644 (file)
@@ -56,10 +56,6 @@ struct conf_config
     database_hosts_t database_hosts;
 };
 
-
-static char *parse_settings(struct conf_config *config,
-                            NMEM nmem, xmlNode *node);
-
 static void conf_metadata_assign(NMEM nmem, 
                                  struct conf_metadata * metadata,
                                  const char *name,
@@ -106,7 +102,6 @@ static void conf_sortkey_assign(NMEM nmem,
     sortkey->type = type;
 }
 
-
 static struct conf_service *service_init(struct conf_server *server,
                                          int num_metadata, int num_sortkeys,
                                          const char *service_id)
@@ -119,7 +114,6 @@ static struct conf_service *service_init(struct conf_server *server,
     service->ref_count = 1;
     service->nmem = nmem;
     service->next = 0;
-    service->settings = 0;
     service->databases = 0;
     service->server = server;
     service->session_timeout = 60; /* default session timeout */
@@ -132,9 +126,9 @@ static struct conf_service *service_init(struct conf_server *server,
     service->num_metadata = num_metadata;
     service->metadata = 0;
     if (service->num_metadata)
-      service->metadata 
-          = nmem_malloc(nmem, 
-                        sizeof(struct conf_metadata) * service->num_metadata);
+        service->metadata 
+            = nmem_malloc(nmem, 
+                          sizeof(struct conf_metadata) * service->num_metadata);
     service->num_sortkeys = num_sortkeys;
     service->sortkeys = 0;
     if (service->num_sortkeys)
@@ -172,7 +166,6 @@ static struct conf_metadata* conf_service_add_metadata(
     return md;
 }
 
-
 static struct conf_sortkey * conf_service_add_sortkey(
     struct conf_service *service,
     int field_id,
@@ -182,7 +175,7 @@ static struct conf_sortkey * conf_service_add_sortkey(
     struct conf_sortkey * sk = 0;
 
     if (!service || !service->sortkeys || !service->num_sortkeys
-        || field_id < 0  || !(field_id < service->num_sortkeys))
+        || field_id < 0 || !(field_id < service->num_sortkeys))
         return 0;
 
     //sk = &((service->sortkeys)[field_id]);
@@ -192,7 +185,6 @@ static struct conf_sortkey * conf_service_add_sortkey(
     return sk;
 }
 
-
 int conf_service_metadata_field_id(struct conf_service *service,
                                    const char * name)
 {
@@ -200,16 +192,13 @@ int conf_service_metadata_field_id(struct conf_service *service,
 
     if (!service || !service->metadata || !service->num_metadata)
         return -1;
-
-    for(i = 0; i < service->num_metadata; i++) {
+    
+    for (i = 0; i < service->num_metadata; i++)
         if (!strcmp(name, (service->metadata[i]).name))
             return i;
-    }
-   
     return -1;
 }
 
-
 int conf_service_sortkey_field_id(struct conf_service *service,
                                   const char * name)
 {
@@ -218,11 +207,9 @@ int conf_service_sortkey_field_id(struct conf_service *service,
     if (!service || !service->sortkeys || !service->num_sortkeys)
         return -1;
 
-    for(i = 0; i < service->num_sortkeys; i++) {
+    for (i = 0; i < service->num_sortkeys; i++)
         if (!strcmp(name, (service->sortkeys[i]).name))
             return i;
-    }
-   
     return -1;
 }
 
@@ -594,39 +581,17 @@ static struct conf_service *service_create_static(struct conf_server *server,
     return service;
 }
 
-static char *parse_settings(struct conf_config *config,
-                            NMEM nmem, xmlNode *node)
-{
-    xmlChar *src = xmlGetProp(node, (xmlChar *) "src");
-    char *r;
-
-    if (src)
-    {
-        WRBUF w = wrbuf_alloc();
-        conf_dir_path(config, w, (const char *) src);
-        r = nmem_strdup(nmem, wrbuf_cstr(w));
-        wrbuf_destroy(w);
-    }
-    else
-    {
-        yaz_log(YLOG_FATAL, "Must specify src in targetprofile");
-        return 0;
-    }
-    xmlFree(src);
-    return r;
-}
-
 static void inherit_server_settings(struct conf_service *s)
 {
     struct conf_server *server = s->server;
     if (!s->dictionary) /* service has no config settings ? */
     {
-        if (server->server_settings)
+        if (server->settings_fname)
         {
             /* inherit settings from server */
             init_settings(s);
-            settings_read_file(s, server->server_settings, 1);
-            settings_read_file(s, server->server_settings, 2);
+            settings_read_file(s, server->settings_fname, 1);
+            settings_read_file(s, server->settings_fname, 2);
         }
         else
         {
@@ -660,7 +625,6 @@ struct conf_service *service_create(struct conf_server *server,
     if (service)
     {
         inherit_server_settings(service);
-        resolve_databases(service);
         assert(service->mutex == 0);
         pazpar2_mutex_create(&service->mutex, "conf");
     }
@@ -683,10 +647,10 @@ static struct conf_server *server_create(struct conf_config *config,
     server->config = config;
     server->next = 0;
     server->charsets = 0;
-    server->server_settings = 0;
     server->http_server = 0;
     server->iochan_man = 0;
-    server->database_hosts = 0;
+    server->database_hosts = config->database_hosts;
+    server->settings_fname = 0;
 
     if (server_id)
     {
@@ -727,13 +691,24 @@ static struct conf_server *server_create(struct conf_config *config,
         }
         else if (!strcmp((const char *) n->name, "settings"))
         {
-            if (server->server_settings)
+            xmlChar *src = xmlGetProp(n, (xmlChar *) "src");
+            WRBUF w;
+            if (!src)
             {
-                yaz_log(YLOG_FATAL, "Can't repeat 'settings'");
+                yaz_log(YLOG_FATAL, "Missing src attribute for settings");
                 return 0;
             }
-            if (!(server->server_settings = parse_settings(config, nmem, n)))
+            if (server->settings_fname)
+            {
+                xmlFree(src);
+                yaz_log(YLOG_FATAL, "Can't repeat 'settings'");
                 return 0;
+            }
+            w = wrbuf_alloc();
+            conf_dir_path(config, w, (const char *) src);
+            server->settings_fname = nmem_strdup(nmem, wrbuf_cstr(w));
+            wrbuf_destroy(w);
+            xmlFree(src);
         }
         else if (!strcmp((const char *) n->name, "icu_chain"))
         {
@@ -912,7 +887,7 @@ struct conf_config *config_create(const char *fname, int verbose)
     config->servers = 0;
     config->no_threads = 0;
     config->iochan_man = 0;
-    config->database_hosts = 0;
+    config->database_hosts = database_hosts_create();
 
     config->confdir = wrbuf_alloc();
     if ((p = strrchr(fname, 
@@ -979,9 +954,8 @@ void config_destroy(struct conf_config *config)
             struct conf_server *s_next = server->next;
             server_destroy(server);
             server = s_next;
+            database_hosts_destroy(&config->database_hosts);
         }
-        database_hosts_destroy(&config->database_hosts);
-
         wrbuf_destroy(config->confdir);
         nmem_destroy(config->nmem);
     }
@@ -998,22 +972,18 @@ void config_process_events(struct conf_config *conf)
 {
     struct conf_server *ser;
     
-    conf->database_hosts = database_hosts_create();
     for (ser = conf->servers; ser; ser = ser->next)
     {
         struct conf_service *s = ser->service;
 
-        ser->database_hosts = conf->database_hosts;
-
         for (;s ; s = s->next)
         {
-            resolve_databases(s);
             assert(s->mutex == 0);
             pazpar2_mutex_create(&s->mutex, "service");
         }
         http_mutex_init(ser);
     }
-    iochan_man_events(conf->iochan_man);    
+    iochan_man_events(conf->iochan_man);
 }
 
 int config_start_listeners(struct conf_config *conf,
index c8ea60e..f3c346b 100644 (file)
@@ -30,7 +30,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 enum conf_metadata_type {
     Metadata_type_generic,    // Generic text field
-    Metadata_type_number,     // A number
     Metadata_type_year,        // A number
     Metadata_type_date        // A number
 };
@@ -110,7 +109,6 @@ struct conf_service
     struct setting_dictionary *dictionary;
     struct conf_service *next;
     char *id;
-    char *settings;
     NMEM nmem;
     int session_timeout;
     int z3950_session_timeout;
@@ -135,7 +133,7 @@ struct conf_server
     char *proxy_host;
     int proxy_port;
     char *myurl;
-    char *server_settings;
+    char *settings_fname;
     char *server_id;
 
     pp2_charset_fact_t charsets;
index 622885a..5339f2d 100644 (file)
@@ -54,6 +54,7 @@ static int run(FILE *inf, struct addrinfo *res)
         long long id;
         int sz, r, c;
         char req[100];
+        char request_type[100];
         size_t i;
         struct con **conp;
         c = fgetc(inf);
@@ -66,8 +67,9 @@ static int run(FILE *inf, struct addrinfo *res)
             c = fgetc(inf);
         }
         req[i] = 0;
-        r = sscanf(req, "%lld %lld %lld %d", &tv_sec1, &tv_usec1, &id, &sz);
-        if (r != 4)
+        r = sscanf(req, "%s %lld %lld %lld %d", request_type,
+                   &tv_sec1, &tv_usec1, &id, &sz);
+        if (r != 5)
         {
             fprintf(stderr, "bad line %s\n", req);
             return -1;
@@ -145,11 +147,14 @@ static int run(FILE *inf, struct addrinfo *res)
                             (long long) toread, (long long) r);
                     return -1;
                 }
-                w = write((*conp)->fd, buf, toread);
-                if (w != toread)
-                {
-                    fprintf(stderr, "write truncated\n");
-                    return -1;
+                if (*request_type == 'r')
+                {   /* Only deal with things tha Pazpar2 received */
+                    w = write((*conp)->fd, buf, toread);
+                    if (w != toread)
+                    {
+                        fprintf(stderr, "write truncated\n");
+                        return -1;
+                    }
                 }
                 cnt += toread;
             }
index b4e2a6d..6ac71cd 100644 (file)
@@ -116,6 +116,7 @@ struct reclist_sortparms *reclist_parse_sortparms(NMEM nmem, const char *parms,
         new->offset = offset;
         new->type = type;
         new->increasing = increasing;
+        new->name = nmem_strdup(nmem, parm);
         rp = &new->next;
         if (*(parms = cpp))
             parms++;
@@ -313,6 +314,17 @@ struct record_cluster *reclist_insert(struct reclist *l,
         if (!strcmp(merge_key, (*p)->record->merge_key))
         {
             struct record_cluster *existing = (*p)->record;
+            struct record *re = existing->records;
+
+            for (; re; re = re->next)
+            {
+                if (re->client == record->client &&
+                    record_compare(record, re, service))
+                { 
+                    yaz_mutex_leave(l->mutex);
+                    return 0;
+                }
+            }
             record->next = existing->records;
             existing->records = record;
             cluster = existing;
index 6f13e50..26ddd4b 100644 (file)
@@ -31,6 +31,7 @@ struct reclist_sortparms
     int offset;
     enum conf_sortkey_type type;
     int increasing;
+    char *name;
     struct reclist_sortparms *next;
 };
 
index c43af42..874a0a2 100644 (file)
@@ -90,98 +90,41 @@ struct record_metadata * record_metadata_create(NMEM nmem)
 }
 
 
-struct record_metadata * record_metadata_insert(NMEM nmem, 
-                                                struct record_metadata ** rmd,
-                                                union data_types data)
+int record_compare(struct record *r1, struct record *r2,
+                   struct conf_service *service)
 {
-    struct record_metadata * tmp_rmd = 0;
-    // assert(nmem);
-
-    if(!rmd)
-        return 0;
-
-    // construct new record_metadata
-    tmp_rmd  = nmem_malloc(nmem, sizeof(struct record_metadata));
-    tmp_rmd->data = data;
-
-
-    // insert in *rmd's place, moving *rmd one down the list
-    tmp_rmd->next = *rmd;
-    *rmd = tmp_rmd;
-
-    return *rmd;
-}
-
-struct record_metadata * record_add_metadata_field_id(NMEM nmem, 
-                                                     struct record * record,
-                                                     int field_id, 
-                                                     union data_types data)
-{
-    if (field_id < 0 || !record || !record->metadata)
-        return 0;
-
-    return record_metadata_insert(nmem, &(record->metadata[field_id]), data);
-}
-
-
-struct record_metadata * record_add_metadata(NMEM nmem, 
-                                             struct record * record,
-                                             struct conf_service * service,
-                                             const char * name,
-                                             union data_types data)
-{
-    int field_id = 0;
-
-    if (!record || !record->metadata || !service || !name)  
-        return 0;
-    
-    field_id = conf_service_metadata_field_id(service, name);
-
-    if (-1 == field_id)
-        return 0;
-    
-    return record_metadata_insert(nmem, &(record->metadata[field_id]), data);
-}
-
-
-
-
-
-
-union data_types * record_assign_sortkey_field_id(NMEM nmem, 
-                                               struct record * record,
-                                               int field_id, 
-                                               union data_types data)
-{
-    if (field_id < 0 || !record || !record->sortkeys)
-        return 0;
-
-    return data_types_assign(nmem, &(record->sortkeys[field_id]), data);
-}
-
-
-
-union data_types * record_assign_sortkey(NMEM nmem, 
-                                      struct record * record,
-                                      struct conf_service * service,
-                                      const char * name,
-                                      union data_types data)
-{
-    int field_id = 0;
-
-    if (!record || !service || !name)  
-        return 0;
-    
-    field_id = conf_service_sortkey_field_id(service, name);
-
-    if (!(-1 < field_id) || !(field_id < service->num_sortkeys))
-        return 0;
-
-    return record_assign_sortkey_field_id(nmem, record, field_id, data);
+    int i;
+    for (i = 0; i < service->num_metadata; i++)
+    {
+        struct conf_metadata *ser_md = &service->metadata[i];
+        enum conf_metadata_type type = ser_md->type;
+            
+        struct record_metadata *m1 = r1->metadata[i];
+        struct record_metadata *m2 = r2->metadata[i];
+        while (m1 && m2)
+        {
+            switch (type)
+            {
+            case Metadata_type_generic:
+                if (strcmp(m1->data.text.disp, m2->data.text.disp))
+                    return 0;
+                break;
+            case Metadata_type_date:
+            case Metadata_type_year:
+                if (m1->data.number.min != m2->data.number.min ||
+                    m1->data.number.max != m2->data.number.max)
+                    return 0;
+                break;
+            }
+            m1 = m1->next;
+            m2 = m2->next;
+        }
+        if (m1 || m2)
+            return 0;
+    }
+    return 1;
 }
 
-
-
 /*
  * Local variables:
  * c-basic-offset: 4
index 3960f72..b7efc2e 100644 (file)
@@ -72,38 +72,7 @@ struct record * record_create(NMEM nmem, int num_metadata, int num_sortkeys,
 
 struct record_metadata * record_metadata_create(NMEM nmem);
 
-struct record_metadata * record_metadata_insert(NMEM nmem, 
-                                                struct record_metadata ** rmd,
-                                                union data_types data);
-
-
-struct record_metadata * record_add_metadata_field_id(NMEM nmem, 
-                                                      struct record * record,
-                                                      int field_id, 
-                                                      union data_types data);
-
-
-struct record_metadata * record_add_metadata(NMEM nmem, 
-                                             struct record * record,
-                                             struct conf_service * service,
-                                             const char * name,
-                                             union data_types data);
-
-
-union data_types * record_assign_sortkey_field_id(NMEM nmem, 
-                                               struct record * record,
-                                               int field_id, 
-                                               union data_types data);
-
-
-union data_types * record_assign_sortkey(NMEM nmem, 
-                                      struct record * record,
-                                      struct conf_service * service,
-                                      const char * name,
-                                      union data_types data);
-
-
-
+int record_compare(struct record *r1, struct record *r2, struct conf_service *service);
 
 struct record_cluster
 {
@@ -120,9 +89,6 @@ struct record_cluster
     struct record *records;
 };
 
-
-
-
 #endif // RECORD_H
 
 /*
index 72feef6..388e94e 100644 (file)
@@ -95,6 +95,12 @@ struct client_list {
     struct client_list *next;
 };
 
+struct session_sorted_results {
+    const char *field;
+    int increasing;
+    struct session_sorted_results *next;
+};
+
 /* session counting (1) , disable client counting (0) */
 static YAZ_MUTEX g_session_mutex = 0;
 static int no_sessions = 0;
@@ -246,13 +252,13 @@ static xmlDoc *record_to_xml(struct session *se,
     if (!rdoc)
     {
         session_log(se, YLOG_FATAL, "Non-wellformed XML received from %s",
-                    db->url);
+                    db->id);
         return 0;
     }
 
     if (global_parameters.dump_records)
     {
-        session_log(se, YLOG_LOG, "Un-normalized record from %s", db->url);
+        session_log(se, YLOG_LOG, "Un-normalized record from %s", db->id);
         log_xml_doc(rdoc);
     }
 
@@ -340,7 +346,7 @@ static xmlDoc *normalize_record(struct session *se,
         if (normalize_record_transform(sdb->map, &rdoc, (const char **)parms))
         {
             session_log(se, YLOG_WARN, "Normalize failed from %s",
-                        sdb->database->url);
+                        sdb->database->id);
         }
         else
         {
@@ -349,7 +355,7 @@ static xmlDoc *normalize_record(struct session *se,
             if (global_parameters.dump_records)
             {
                 session_log(se, YLOG_LOG, "Normalized record from %s", 
-                            sdb->database->url);
+                            sdb->database->id);
                 log_xml_doc(rdoc);
             }
         }
@@ -401,7 +407,7 @@ static int prepare_map(struct session *se, struct session_database *sdb)
 
     if (!sdb->settings)
     {
-        session_log(se, YLOG_WARN, "No settings on %s", sdb->database->url);
+        session_log(se, YLOG_WARN, "No settings on %s", sdb->database->id);
         return -1;
     }
     if ((s = session_setting_oneval(sdb, PZ_XSLT)))
@@ -447,7 +453,7 @@ static int prepare_session_database(struct session *se,
     if (!sdb->settings)
     {
         session_log(se, YLOG_WARN, 
-                "No settings associated with %s", sdb->database->url);
+                "No settings associated with %s", sdb->database->id);
         return -1;
     }
     if (sdb->settings[PZ_XSLT] && !sdb->map)
@@ -521,11 +527,12 @@ void session_alert_watch(struct session *s, int what)
 }
 
 //callback for grep_databases
-static void select_targets_callback(void *context, struct session_database *db)
+static void select_targets_callback(struct session *se,
+                                    struct session_database *db)
 {
-    struct session *se = (struct session*) context;
-    struct client *cl = client_create();
+    struct client *cl = client_create(db->database->id);
     struct client_list *l;
+
     client_set_database(cl, db);
 
     client_set_session(cl, se);
@@ -590,12 +597,84 @@ int session_is_preferred_clients_ready(struct session *s)
     return res == 0;
 }
 
-enum pazpar2_error_code search(struct session *se,
-                               const char *query,
-                               const char *startrecs, const char *maxrecs,
-                               const char *filter,
-                               const char *limit,
-                               const char **addinfo)
+static const char *get_strategy_plus_sort(struct client *l, const char *field)
+{
+    struct session_database *sdb = client_get_database(l);
+    struct setting *s;
+
+    const char *strategy_plus_sort = 0;
+    
+    for (s = sdb->settings[PZ_SORTMAP]; s; s = s->next)
+    {
+        char *p = strchr(s->name + 3, ':');
+        if (!p)
+        {
+            yaz_log(YLOG_WARN, "Malformed sortmap name: %s", s->name);
+            continue;
+        }
+        p++;
+        if (!strcmp(p, field))
+        {
+            strategy_plus_sort = s->value;
+            break;
+        }
+    }
+    return strategy_plus_sort;
+}
+
+void session_sort(struct session *se, const char *field, int increasing)
+{
+    struct session_sorted_results *sr;
+    struct client_list *l;
+
+    session_enter(se);
+
+    /* see if we already have sorted for this critieria */
+    for (sr = se->sorted_results; sr; sr = sr->next)
+    {
+        if (!strcmp(field, sr->field) && increasing == sr->increasing)
+            break;
+    }
+    if (sr)
+    {
+        yaz_log(YLOG_LOG, "search_sort: field=%s increasing=%d already fetched",
+                field, increasing);
+        session_leave(se);
+        return;
+    }
+    yaz_log(YLOG_LOG, "search_sort: field=%s increasing=%d must fetch",
+            field, increasing);
+    sr = nmem_malloc(se->nmem, sizeof(*sr));
+    sr->field = nmem_strdup(se->nmem, field);
+    sr->increasing = increasing;
+    sr->next = se->sorted_results;
+    se->sorted_results = sr;
+    
+    for (l = se->clients; l; l = l->next)
+    {
+        struct client *cl = l->client;
+        const char *strategy_plus_sort = get_strategy_plus_sort(cl, field);
+        if (strategy_plus_sort)
+        {
+            struct timeval tval;
+            if (client_prep_connection(cl, se->service->z3950_operation_timeout,
+                                       se->service->z3950_session_timeout,
+                                       se->service->server->iochan_man,
+                                       &tval))
+                client_start_search(cl, strategy_plus_sort, increasing);
+        }
+    }
+    session_leave(se);
+}
+
+enum pazpar2_error_code session_search(struct session *se,
+                                       const char *query,
+                                       const char *startrecs,
+                                       const char *maxrecs,
+                                       const char *filter,
+                                       const char *limit,
+                                       const char **addinfo,
+                                       const char *sort_field, int increasing)
 {
     int live_channels = 0;
     int no_working = 0;
@@ -615,8 +694,15 @@ enum pazpar2_error_code search(struct session *se,
     se->reclist = 0;
     relevance_destroy(&se->relevance);
     nmem_reset(se->nmem);
-    se->total_records = se->total_hits = se->total_merged = 0;
+    se->total_records = se->total_merged = 0;
     se->num_termlists = 0;
+
+    /* reset list of sorted results and clear to relevance search */
+    se->sorted_results = nmem_malloc(se->nmem, sizeof(*se->sorted_results));
+    se->sorted_results->field = nmem_strdup(se->nmem, sort_field);
+    se->sorted_results->increasing = increasing;
+    se->sorted_results->next = 0;
+    
     live_channels = select_targets(se, filter);
     if (!live_channels)
     {
@@ -639,6 +725,7 @@ enum pazpar2_error_code search(struct session *se,
     for (l = se->clients; l; l = l->next)
     {
         struct client *cl = l->client;
+        const char *strategy_plus_sort = get_strategy_plus_sort(cl, sort_field);
 
         if (maxrecs)
             client_set_maxrecs(cl, atoi(maxrecs));
@@ -655,7 +742,7 @@ enum pazpar2_error_code search(struct session *se,
                                        se->service->z3950_session_timeout,
                                        se->service->server->iochan_man,
                                        &tval))
-                client_start_search(cl);
+                client_start_search(cl, strategy_plus_sort, increasing);
         }
     }
     facet_limits_destroy(facet_limits);
@@ -717,8 +804,6 @@ static struct session_database *load_session_database(struct session *se,
 {
     struct database *db = new_database(id, se->session_nmem);
 
-    resolve_database(se->service, db);
-
     session_init_databases_fun((void*) se, db);
 
     // New sdb is head of se->databases list
@@ -732,7 +817,7 @@ static struct session_database *find_session_database(struct session *se,
     struct session_database *sdb;
 
     for (sdb = se->databases; sdb; sdb = sdb->next)
-        if (!strcmp(sdb->database->url, id))
+        if (!strcmp(sdb->database->id, id))
             return sdb;
     return load_session_database(se, id);
 }
@@ -815,7 +900,6 @@ struct session *new_session(NMEM nmem, struct conf_service *service,
     session_log(session, YLOG_DEBUG, "New");
     session->service = service;
     session->relevance = 0;
-    session->total_hits = 0;
     session->total_records = 0;
     session->number_of_warnings_unknown_elements = 0;
     session->number_of_warnings_unknown_metadata = 0;
@@ -837,13 +921,13 @@ struct session *new_session(NMEM nmem, struct conf_service *service,
     return session;
 }
 
-struct hitsbytarget *hitsbytarget(struct session *se, int *count, NMEM nmem)
+static struct hitsbytarget *hitsbytarget_nb(struct session *se,
+                                            int *count, NMEM nmem)
 {
     struct hitsbytarget *res = 0;
     struct client_list *l;
     size_t sz = 0;
 
-    session_enter(se);
     for (l = se->clients; l; l = l->next)
         sz++;
 
@@ -856,7 +940,7 @@ struct hitsbytarget *hitsbytarget(struct session *se, int *count, NMEM nmem)
         const char *name = session_setting_oneval(client_get_database(cl),
                                                   PZ_NAME);
 
-        res[*count].id = client_get_database(cl)->database->url;
+        res[*count].id = client_get_id(cl);
         res[*count].name = *name ? name : "Unknown";
         res[*count].hits = client_get_hits(cl);
         res[*count].records = client_get_num_records(cl);
@@ -868,10 +952,18 @@ struct hitsbytarget *hitsbytarget(struct session *se, int *count, NMEM nmem)
         wrbuf_destroy(w);
         (*count)++;
     }
-    session_leave(se);
     return res;
 }
 
+struct hitsbytarget *get_hitsbytarget(struct session *se, int *count, NMEM nmem)
+{
+    struct hitsbytarget *p;
+    session_enter(se);
+    p = hitsbytarget_nb(se, count, nmem);
+    session_leave(se);
+    return p;
+}
+    
 struct termlist_score **get_termlist_score(struct session *se,
                                            const char *name, int *num)
 {
@@ -889,6 +981,116 @@ struct termlist_score **get_termlist_score(struct session *se,
     return tl;
 }
 
+// Compares two hitsbytarget nodes by hitcount
+static int cmp_ht(const void *p1, const void *p2)
+{
+    const struct hitsbytarget *h1 = p1;
+    const struct hitsbytarget *h2 = p2;
+    return h2->hits - h1->hits;
+}
+
+static int targets_termlist_nb(WRBUF wrbuf, struct session *se, int num,
+                               NMEM nmem)
+{
+    struct hitsbytarget *ht;
+    int count, i;
+
+    ht = hitsbytarget_nb(se, &count, nmem);
+    qsort(ht, count, sizeof(struct hitsbytarget), cmp_ht);
+    for (i = 0; i < count && i < num && ht[i].hits > 0; i++)
+    {
+
+        // do only print terms which have display names
+    
+        wrbuf_puts(wrbuf, "<term>\n");
+
+        wrbuf_puts(wrbuf, "<id>");
+        wrbuf_xmlputs(wrbuf, ht[i].id);
+        wrbuf_puts(wrbuf, "</id>\n");
+        
+        wrbuf_puts(wrbuf, "<name>");
+        if (!ht[i].name || !ht[i].name[0])
+            wrbuf_xmlputs(wrbuf, "NO TARGET NAME");
+        else
+            wrbuf_xmlputs(wrbuf, ht[i].name);
+        wrbuf_puts(wrbuf, "</name>\n");
+        
+        wrbuf_printf(wrbuf, "<frequency>" ODR_INT_PRINTF "</frequency>\n",
+                     ht[i].hits);
+        
+        wrbuf_puts(wrbuf, "<state>");
+        wrbuf_xmlputs(wrbuf, ht[i].state);
+        wrbuf_puts(wrbuf, "</state>\n");
+        
+        wrbuf_printf(wrbuf, "<diagnostic>%d</diagnostic>\n", 
+                     ht[i].diagnostic);
+        wrbuf_puts(wrbuf, "</term>\n");
+    }
+    return count;
+}
+
+void perform_termlist(struct http_channel *c, struct session *se,
+                      const char *name, int num)
+{
+    int i, j;
+    NMEM nmem_tmp = nmem_create();
+    char **names;
+    int num_names = 0;
+
+    if (name)
+        nmem_strsplit(nmem_tmp, ",", name, &names, &num_names);
+
+    session_enter(se);
+
+    for (j = 0; j < num_names; j++)
+    {
+        const char *tname;
+        
+        wrbuf_puts(c->wrbuf, "<list name=\"");
+        wrbuf_xmlputs(c->wrbuf, names[j]);
+        wrbuf_puts(c->wrbuf, "\">\n");
+
+        for (i = 0; i < se->num_termlists; i++)
+        {
+            tname = se->termlists[i].name;
+            if (num_names > 0 && !strcmp(names[j], tname))
+            {
+                struct termlist_score **p = 0;
+                int len;
+                p = termlist_highscore(se->termlists[i].termlist, &len);
+                if (p)
+                {
+                    int i;
+                    for (i = 0; i < len && i < num; i++)
+                    {
+                        // prevent sending empty term elements
+                        if (!p[i]->display_term || !p[i]->display_term[0])
+                            continue;
+                        
+                        wrbuf_puts(c->wrbuf, "<term>");
+                        wrbuf_puts(c->wrbuf, "<name>");
+                        wrbuf_xmlputs(c->wrbuf, p[i]->display_term);
+                        wrbuf_puts(c->wrbuf, "</name>");
+                        
+                        wrbuf_printf(c->wrbuf, 
+                                     "<frequency>%d</frequency>", 
+                                     p[i]->frequency);
+                        wrbuf_puts(c->wrbuf, "</term>\n");
+                    }
+                }
+            }
+        }
+        tname = "xtargets";
+        if (num_names > 0 && !strcmp(names[j], tname))
+        {
+            targets_termlist_nb(c->wrbuf, se, num, c->nmem);
+        }
+        wrbuf_puts(c->wrbuf, "</list>\n");
+    }
+    session_leave(se);
+    nmem_destroy(nmem_tmp);
+}
+
 #ifdef MISSING_HEADERS
 void report_nmem_stats(void)
 {
@@ -956,6 +1158,8 @@ struct record_cluster **show_range_start(struct session *se,
     }
     else
     {
+        struct client_list *l;
+        
         for (spp = sp; spp; spp = spp->next)
             if (spp->type == Metadata_sortkey_relevance)
             {
@@ -966,7 +1170,10 @@ struct record_cluster **show_range_start(struct session *se,
         
         reclist_enter(se->reclist);
         *total = reclist_get_num_records(se->reclist);
-        *sumhits = se->total_hits;
+
+        *sumhits = 0;
+        for (l = se->clients; l; l = l->next)
+            *sumhits += client_get_hits(l->client);
         
         for (i = 0; i < start; i++)
             if (!reclist_read_record(se->reclist))
@@ -1009,11 +1216,13 @@ void statistics(struct session *se, struct statistics *stat)
     int count = 0;
 
     memset(stat, 0, sizeof(*stat));
+    stat->num_hits = 0;
     for (l = se->clients; l; l = l->next)
     {
         struct client *cl = l->client;
         if (!client_get_connection(cl))
             stat->num_no_connection++;
+        stat->num_hits += client_get_hits(cl);
         switch (client_get_state(cl))
         {
         case Client_Connecting: stat->num_connecting++; break;
@@ -1025,7 +1234,6 @@ void statistics(struct session *se, struct statistics *stat)
         }
         count++;
     }
-    stat->num_hits = se->total_hits;
     stat->num_records = se->total_records;
 
     stat->num_clients = count;
@@ -1185,8 +1393,13 @@ static const char *get_mergekey(xmlDoc *doc, struct client *cl, int record_no,
     /* generate unique key if none is not generated already or is empty */
     if (wrbuf_len(norm_wr) == 0)
     {
-        wrbuf_printf(norm_wr, "%s-%d",
-                     client_get_database(cl)->database->url, record_no);
+        wrbuf_printf(norm_wr, "position: %s-%d",
+                     client_get_id(cl), record_no);
+    }
+    else
+    {
+        const char *lead = "content: ";
+        wrbuf_insert(norm_wr, 0, lead, strlen(lead));
     }
     if (wrbuf_len(norm_wr) > 0)
         mergekey_norm = nmem_strdup(nmem, wrbuf_cstr(norm_wr));
@@ -1290,7 +1503,7 @@ int ingest_record(struct client *cl, const char *rec,
     if (!check_record_filter(root, sdb))
     {
         session_log(se, YLOG_LOG, "Filtered out record no %d from %s",
-                    record_no, sdb->database->url);
+                    record_no, sdb->database->id);
         xmlFreeDoc(xdoc);
         return -2;
     }
@@ -1304,7 +1517,7 @@ int ingest_record(struct client *cl, const char *rec,
     }
     session_enter(se);
     if (client_get_session(cl) == se)
-        ret = ingest_to_cluster(cl, xdoc, root, record_no, mergekey_norm);
+        ingest_to_cluster(cl, xdoc, root, record_no, mergekey_norm);
     session_leave(se);
     
     xmlFreeDoc(xdoc);
@@ -1320,43 +1533,18 @@ static int ingest_to_cluster(struct client *cl,
     xmlNode *n;
     xmlChar *type = 0;
     xmlChar *value = 0;
-    struct session_database *sdb = client_get_database(cl);
     struct session *se = client_get_session(cl);
     struct conf_service *service = se->service;
+    int term_factor = 1;
+    struct record_cluster *cluster;
+    struct session_database *sdb = client_get_database(cl);
     struct record *record = record_create(se->nmem, 
                                           service->num_metadata,
                                           service->num_sortkeys, cl,
                                           record_no);
-    struct record_cluster *cluster = reclist_insert(se->reclist,
-                                                    service, 
-                                                    record,
-                                                    mergekey_norm,
-                                                    &se->total_merged);
-
-    const char *use_term_factor_str = session_setting_oneval(sdb, PZ_TERMLIST_TERM_FACTOR);
-    int use_term_factor = 0;
-    int term_factor = 1; 
-    if (use_term_factor_str && use_term_factor_str[0] != 0)
-       use_term_factor =  atoi(use_term_factor_str);
-    if (use_term_factor) {
-        int maxrecs = client_get_maxrecs(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 (%d / %d)", term_factor, MAX(hits, maxrecs), MAX(1, maxrecs));
-    }
 
-    if (!cluster)
-        return -1;
-    if (global_parameters.dump_records)
-        session_log(se, YLOG_LOG, "Cluster id %s from %s (#%d)", cluster->recid,
-                    sdb->database->url, record_no);
-    relevance_newrec(se->relevance, cluster);
-    
-    // now parsing XML record and adding data to cluster or record metadata
     for (n = root->children; n; n = n->next)
     {
-        pp2_charset_token_t prt;
         if (type)
             xmlFree(type);
         if (value)
@@ -1368,11 +1556,9 @@ static int ingest_to_cluster(struct client *cl,
         if (!strcmp((const char *) n->name, "metadata"))
         {
             struct conf_metadata *ser_md = 0;
-            struct conf_sortkey *ser_sk = 0;
             struct record_metadata **wheretoput = 0;
             struct record_metadata *rec_md = 0;
             int md_field_id = -1;
-            int sk_field_id = -1;
             
             type = xmlGetProp(n, (xmlChar *) "type");
             value = xmlNodeListGetString(xdoc, n->children, 1);
@@ -1392,13 +1578,8 @@ static int ingest_to_cluster(struct client *cl,
                 se->number_of_warnings_unknown_metadata++;
                 continue;
             }
-            
+           
             ser_md = &service->metadata[md_field_id];
-            
-            if (ser_md->sortkey_offset >= 0){
-                sk_field_id = ser_md->sortkey_offset;
-                ser_sk = &service->sortkeys[sk_field_id];
-            }
 
             // non-merged metadata
             rec_md = record_metadata_init(se->nmem, (const char *) value,
@@ -1413,10 +1594,80 @@ static int ingest_to_cluster(struct client *cl,
             while (*wheretoput)
                 wheretoput = &(*wheretoput)->next;
             *wheretoput = rec_md;
+        }
+    }
+
+    cluster = reclist_insert(se->reclist, service, record,
+                             mergekey_norm, &se->total_merged);
+    if (!cluster)
+        return -1;
+
+    {
+        const char *use_term_factor_str =
+            session_setting_oneval(sdb, PZ_TERMLIST_TERM_FACTOR);
+        if (use_term_factor_str && use_term_factor_str[0] == '1')
+        {
+            int maxrecs = client_get_maxrecs(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 (%d / %d)", term_factor, MAX(hits, maxrecs), MAX(1, maxrecs));
+        }
+    }
+
+    if (global_parameters.dump_records)
+        session_log(se, YLOG_LOG, "Cluster id %s from %s (#%d)", cluster->recid,
+                    sdb->database->id, record_no);
+
+
+    relevance_newrec(se->relevance, cluster);
+    
+    // now parsing XML record and adding data to cluster or record metadata
+    for (n = root->children; n; n = n->next)
+    {
+        pp2_charset_token_t prt;
+        if (type)
+            xmlFree(type);
+        if (value)
+            xmlFree(value);
+        type = value = 0;
+        
+        if (n->type != XML_ELEMENT_NODE)
+            continue;
+        if (!strcmp((const char *) n->name, "metadata"))
+        {
+            struct conf_metadata *ser_md = 0;
+            struct conf_sortkey *ser_sk = 0;
+            struct record_metadata **wheretoput = 0;
+            struct record_metadata *rec_md = 0;
+            int md_field_id = -1;
+            int sk_field_id = -1;
+            
+            type = xmlGetProp(n, (xmlChar *) "type");
+            value = xmlNodeListGetString(xdoc, n->children, 1);
+            
+            if (!type || !value || !*value)
+                continue;
+            
+            md_field_id 
+                = conf_service_metadata_field_id(service, (const char *) type);
+            if (md_field_id < 0)
+                continue;
+            
+            ser_md = &service->metadata[md_field_id];
+            
+            if (ser_md->sortkey_offset >= 0)
+            {
+                sk_field_id = ser_md->sortkey_offset;
+                ser_sk = &service->sortkeys[sk_field_id];
+            }
 
             // merged metadata
             rec_md = record_metadata_init(se->nmem, (const char *) value,
                                           ser_md->type, 0);
+            if (!rec_md)
+                continue;
+
             wheretoput = &cluster->metadata[md_field_id];
 
             // and polulate with data:
index fbb4e3c..38e3a38 100644 (file)
@@ -52,14 +52,9 @@ enum pazpar2_error_code {
     PAZPAR2_LAST_ERROR
 };
 
-struct host;
-// Represents a (virtual) database on a host
+// Represents a database
 struct database {
-    struct host *host;
-    char *url;
-    char **databases;
-    int errors;
-    struct zr_explain *explain;
+    char *id;
     int num_settings;
     struct setting **settings;
     struct database *next;
@@ -112,7 +107,6 @@ struct session {
     struct relevance *relevance;
     struct reclist *reclist;
     struct session_watchentry watchlist[SESSION_WATCH_MAX + 1];
-    Odr_int total_hits;
     int total_records;
     int total_merged;
     int number_of_warnings_unknown_elements;
@@ -120,6 +114,7 @@ struct session {
     normalize_cache_t normalize_cache;
     YAZ_MUTEX session_mutex;
     unsigned session_id;
+    struct session_sorted_results *sorted_results;
 };
 
 struct statistics {
@@ -135,7 +130,7 @@ struct statistics {
 };
 
 struct hitsbytarget {
-    char *id;
+    const char *id;
     const char *name;
     Odr_int hits;
     int diagnostic;
@@ -145,17 +140,21 @@ struct hitsbytarget {
     char *settings_xml;
 };
 
-struct hitsbytarget *hitsbytarget(struct session *s, int *count, NMEM nmem);
+struct hitsbytarget *get_hitsbytarget(struct session *s, int *count, NMEM nmem);
 struct session *new_session(NMEM nmem, struct conf_service *service,
                             unsigned session_id);
 void destroy_session(struct session *s);
 void session_init_databases(struct session *s);
-int load_targets(struct session *s, const char *fn);
 void statistics(struct session *s, struct statistics *stat);
-enum pazpar2_error_code search(struct session *s, const char *query,
-                               const char *startrecs, const char *maxrecs,
-                               const char *filter, const char *limit,
-                               const char **addinfo);
+
+void session_sort(struct session *se, const char *field, int increasing);
+
+enum pazpar2_error_code session_search(struct session *s, const char *query,
+                                       const char *startrecs,
+                                       const char *maxrecs,
+                                       const char *filter, const char *limit,
+                                       const char **addinfo,
+                                       const char *sort_field, int increasing);
 struct record_cluster **show_range_start(struct session *s,
                                          struct reclist_sortparms *sp,
                                          int start,
@@ -174,11 +173,12 @@ int session_is_preferred_clients_ready(struct session *s);
 void session_apply_setting(struct session *se, char *dbname, char *setting, char *value);
 const char *session_setting_oneval(struct session_database *db, int offset);
 
-int host_getaddrinfo(struct host *host, iochan_man_t iochan_man);
-
 int ingest_record(struct client *cl, const char *rec, int record_no, NMEM nmem);
 void session_alert_watch(struct session *s, int what);
 void add_facet(struct session *s, const char *type, const char *value, int count);
+
+void perform_termlist(struct http_channel *c, struct session *se,
+                      const char *name, int num);
 void session_log(struct session *s, int level, const char *fmt, ...)
 #ifdef __GNUC__
     __attribute__ ((format (printf, 3, 4)))
index 3455344..d355cf3 100644 (file)
@@ -59,7 +59,6 @@ static char *hard_settings[] = {
     "pz:id",
     "pz:name",
     "pz:queryencoding",
-    "pz:ip",
     "pz:zproxy",
     "pz:apdulog",
     "pz:sru",
@@ -70,14 +69,15 @@ static char *hard_settings[] = {
     "pz:pqf_strftime",
     "pz:negotiation_charset",
     "pz:max_connections",
-    "pz:reuse_connections",     /* PZ_REUSE_CONNECTION    */
-    "pz:termlist_term_factor",  /* PZ_TERMLIST_TERM_FACTOR*/
-    "pz:preferred",             /* PZ_PREFERRED           */
-    "pz:extra_args",            /* PZ_EXTRA_ARGS          */
-    "pz:query_syntax",          /* PZ_QUERY_SYNTAX        */
-    "pz:option_recordfilter",   /* PZ_OPTION_RECORDFILTER */
-    "pz:facetmap:",             /* PZ_FACETMAP */
-    "pz:limitmap:",             /* PZ_LIMITMAP */
+    "pz:reuse_connections",
+    "pz:termlist_term_factor",
+    "pz:preferred",
+    "pz:extra_args",
+    "pz:query_syntax",
+    "pz:facetmap:",
+    "pz:limitmap:",
+    "pz:url",
+    "pz:sortmap:",
     0
 };
 
@@ -335,7 +335,7 @@ void expand_settings_array(struct setting ***set_ar, int *num, int offset,
 
 // This is called from grep_databases -- adds/overrides setting for a target
 // This is also where the rules for precedence of settings are implemented
-static void update_database(void *context, struct database *db)
+static void update_database_fun(void *context, struct database *db)
 {
     struct setting *set = ((struct update_database_context *)
                            context)->set;
@@ -345,7 +345,7 @@ static void update_database(void *context, struct database *db)
     int offset;
 
     // Is this the right database?
-    if (!match_zurl(db->url, set->target))
+    if (!match_zurl(db->id, set->target))
         return;
 
     offset = settings_create_offset(service, set->name);
@@ -403,7 +403,7 @@ static void update_databases(void *client_data, struct setting *set)
     struct update_database_context context;
     context.set = set;
     context.service = service;
-    predef_grep_databases(&context, service, update_database);
+    predef_grep_databases(&context, service, update_database_fun);
 }
 
 // This simply copies the 'hard' (application-specific) settings
@@ -444,7 +444,7 @@ static void prepare_target_dictionary(void *client_data, struct setting *set)
 
     // If target address is not wildcard, add the database
     if (*set->target && !zurl_wildcard(set->target))
-        find_database(set->target, service);
+        create_database_for_service(set->target, service);
 
     // Determine if we already have a dictionary entry
     if (!strncmp(set->name, "pz:", 3) && (p = strchr(set->name + 3, ':')))
index e6e70f4..3451588 100644 (file)
@@ -32,25 +32,25 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #define PZ_ID             9
 #define PZ_NAME          10
 #define PZ_QUERYENCODING 11
-#define PZ_IP            12
-#define PZ_ZPROXY        13
-#define PZ_APDULOG       14
-#define PZ_SRU           15
-#define PZ_SRU_VERSION   16
-#define PZ_PQF_PREFIX    17
-#define PZ_SORT          18
-#define PZ_RECORDFILTER         19
-#define PZ_PQF_STRFTIME  20
-#define PZ_NEGOTIATION_CHARSET  21
-#define PZ_MAX_CONNECTIONS      22
-#define PZ_REUSE_CONNECTIONS    23
-#define PZ_TERMLIST_TERM_FACTOR 24
-#define PZ_PREFERRED            25
-#define PZ_EXTRA_ARGS           26
-#define PZ_QUERY_SYNTAX         27
-#define PZ_OPTION_RECORDFILTER  28
-#define PZ_FACETMAP             29
-#define PZ_LIMITMAP             30
+#define PZ_ZPROXY        12
+#define PZ_APDULOG       13
+#define PZ_SRU           14
+#define PZ_SRU_VERSION   15
+#define PZ_PQF_PREFIX    16
+#define PZ_SORT          17
+#define PZ_RECORDFILTER         18
+#define PZ_PQF_STRFTIME  19
+#define PZ_NEGOTIATION_CHARSET  20
+#define PZ_MAX_CONNECTIONS      21
+#define PZ_REUSE_CONNECTIONS    22
+#define PZ_TERMLIST_TERM_FACTOR 23
+#define PZ_PREFERRED            24
+#define PZ_EXTRA_ARGS           25
+#define PZ_QUERY_SYNTAX         26
+#define PZ_FACETMAP             27
+#define PZ_LIMITMAP             28
+#define PZ_URL                  29
+#define PZ_SORTMAP              30
 #define PZ_MAX_EOF              31
 
 struct setting
@@ -70,7 +70,6 @@ int settings_num(struct conf_service *service);
 int settings_create_offset(struct conf_service *service, const char *name);
 int settings_lookup_offset(struct conf_service *service, const char *name);
 void init_settings(struct conf_service *service);
-void resolve_databases(struct conf_service *service);
 void settings_read_node_x(xmlNode *n,
                           void *client_data,
                           void (*fun)(void *client_data,
index e2121e8..e6521da 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_solr.sh test_url.sh
 
 EXTRA_DIST = run_pazpar2.sh marc21_test.xsl tmarc.xsl solr-pz2.xsl \
        z3950_indexdata_com_marc.xml \
@@ -13,6 +13,7 @@ EXTRA_DIST = run_pazpar2.sh marc21_test.xsl tmarc.xsl solr-pz2.xsl \
        test_settings.cfg test_settings.urls \
        test_solr.cfg test_solr.urls \
        test_turbomarcxml.cfg test_turbomarcxml.urls \
+       test_url.cfg test_url.urls \
        $(check_SCRIPTS)
 
 TESTS = $(check_SCRIPTS)
index a63c538..aaf0155 100644 (file)
@@ -1,5 +1,5 @@
-<termlist>
-<activeclients>0</activeclients>
+<?xml version="1.0" encoding="UTF-8"?>
+<termlist><activeclients>0</activeclients>
 <list name="xtargets">
 <term>
 <id>localhost:9999/db1</id>
@@ -47,4 +47,4 @@
 </list>
 <list name="medium">
 </list>
-</termlist>
+</termlist>
\ No newline at end of file
index f3c7728..a399233 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<show>
-<status>OK</status>
+<show><status>OK</status>
 <activeclients>0</activeclients>
 <merged>1</merged>
 <total>8</total>
@@ -17,6 +16,6 @@
 <md-author>Jack Collins</md-author></location>
 <count>2</count>
 <relevance>240000</relevance>
-<recid>title how to program a computer author jack collins</recid>
+<recid>content: title how to program a computer author jack collins</recid>
 </hit>
-</show>
+</show>
\ No newline at end of file
index 812c1c9..37b5a75 100644 (file)
@@ -1,5 +1,5 @@
-<termlist>
-<activeclients>0</activeclients>
+<?xml version="1.0" encoding="UTF-8"?>
+<termlist><activeclients>0</activeclients>
 <list name="xtargets">
 <term>
 <id>localhost:9999/db1</id>
@@ -47,4 +47,4 @@
 </list>
 <list name="medium">
 </list>
-</termlist>
+</termlist>
\ No newline at end of file
index 95f4261..a6464e4 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<show>
-<status>OK</status>
+<show><status>OK</status>
 <activeclients>0</activeclients>
 <merged>1</merged>
 <total>6</total>
@@ -17,6 +16,6 @@
 <md-author>Jack Collins</md-author></location>
 <count>2</count>
 <relevance>240000</relevance>
-<recid>title how to program a computer author jack collins</recid>
+<recid>content: title how to program a computer author jack collins</recid>
 </hit>
-</show>
+</show>
\ No newline at end of file
index abb5f68..00e11f8 100644 (file)
@@ -1,5 +1,5 @@
-<termlist>
-<activeclients>0</activeclients>
+<?xml version="1.0" encoding="UTF-8"?>
+<termlist><activeclients>0</activeclients>
 <list name="xtargets">
 <term>
 <id>localhost:9999/db1</id>
@@ -47,4 +47,4 @@
 </list>
 <list name="medium">
 </list>
-</termlist>
+</termlist>
\ No newline at end of file
index abb5f68..00e11f8 100644 (file)
@@ -1,5 +1,5 @@
-<termlist>
-<activeclients>0</activeclients>
+<?xml version="1.0" encoding="UTF-8"?>
+<termlist><activeclients>0</activeclients>
 <list name="xtargets">
 <term>
 <id>localhost:9999/db1</id>
@@ -47,4 +47,4 @@
 </list>
 <list name="medium">
 </list>
-</termlist>
+</termlist>
\ No newline at end of file
index 6d2e235..15d66ce 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<show>
-<status>OK</status>
+<show><status>OK</status>
 <activeclients>0</activeclients>
 <merged>8</merged>
 <total>9</total>
@@ -17,7 +16,7 @@
 <md-author>Jack Collins</md-author></location>
 <count>2</count>
 <relevance>28267</relevance>
-<recid>title how to program a computer author jack collins</recid>
+<recid>content: title how to program a computer author jack collins</recid>
 </hit>
 <hit>
 
@@ -28,7 +27,7 @@
 <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>23556</relevance>
-<recid>title computer science technology</recid>
+<recid>content: title computer science technology</recid>
 </hit>
 <hit>
 
@@ -40,7 +39,7 @@
 <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>23556</relevance>
-<recid>title the computer bible</recid>
+<recid>content: title the computer bible</recid>
 </hit>
 <hit>
 
@@ -55,7 +54,7 @@
 <md-author>Englund, Carl R</md-author>
 <md-description>&quot;Contract DOT-UT-10003.&quot;</md-description></location>
 <relevance>10095</relevance>
-<recid>title washington metropolitan area rail computer feasibility study author englund carl r</recid>
+<recid>content: title washington metropolitan area rail computer feasibility study author englund carl r</recid>
 </hit>
 <hit>
 
@@ -70,7 +69,7 @@
 <md-author>Mairs, John W</md-author>
 <md-description>Scale of maps ca. 1:1,000,000</md-description></location>
 <relevance>9815</relevance>
-<recid>title the puget sound region author mairs john w</recid>
+<recid>content: title the puget sound region author mairs john w</recid>
 </hit>
 <hit>
 
@@ -81,7 +80,7 @@
 <md-title-remainder>the proceedings of a workshop</md-title-remainder>
 <md-date>1974</md-date></location>
 <relevance>7067</relevance>
-<recid>title computer processing of dynamic images from an anger scintillation camera</recid>
+<recid>content: title computer processing of dynamic images from an anger scintillation camera</recid>
 </hit>
 <hit>
 
@@ -92,7 +91,7 @@
 <md-date>1977</md-date>
 <md-author>Wood, Helen M</md-author></location>
 <relevance>7067</relevance>
-<recid>title the use of passwords for controlled access to computer resources author wood helen m</recid>
+<recid>content: title the use of passwords for controlled access to computer resources author wood helen m</recid>
 </hit>
 <hit>
 
 <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>
+<recid>content: title reconstruction tomography in diagnostic radiology and nuclear medicine</recid>
 </hit>
-</show>
+</show>
\ No newline at end of file
index 8be225c..598b204 100644 (file)
@@ -1,5 +1,5 @@
-<termlist>
-<activeclients>0</activeclients>
+<?xml version="1.0" encoding="UTF-8"?>
+<termlist><activeclients>0</activeclients>
 <list name="xtargets">
 <term>
 <id>localhost:9999/db1</id>
@@ -42,4 +42,4 @@
 </list>
 <list name="medium">
 </list>
-</termlist>
+</termlist>
\ No newline at end of file
index 1e4328b..dbe5c12 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<show>
-<status>OK</status>
+<show><status>OK</status>
 <activeclients>0</activeclients>
 <merged>6</merged>
 <total>7</total>
@@ -17,7 +16,7 @@
 <md-author>Jack Collins</md-author></location>
 <count>2</count>
 <relevance>36996</relevance>
-<recid>title how to program a computer author jack collins</recid>
+<recid>content: title how to program a computer author jack collins</recid>
 </hit>
 <hit>
 
@@ -28,7 +27,7 @@
 <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>30830</relevance>
-<recid>title computer science technology</recid>
+<recid>content: title computer science technology</recid>
 </hit>
 <hit>
 
@@ -40,7 +39,7 @@
 <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>30830</relevance>
-<recid>title the computer bible</recid>
+<recid>content: title the computer bible</recid>
 </hit>
 <hit>
 
@@ -55,7 +54,7 @@
 <md-author>Mairs, John W</md-author>
 <md-description>Scale of maps ca. 1:1,000,000</md-description></location>
 <relevance>12845</relevance>
-<recid>title the puget sound region author mairs john w</recid>
+<recid>content: title the puget sound region author mairs john w</recid>
 </hit>
 <hit>
 
@@ -66,7 +65,7 @@
 <md-title-remainder>the proceedings of a workshop</md-title-remainder>
 <md-date>1974</md-date></location>
 <relevance>9249</relevance>
-<recid>title computer processing of dynamic images from an anger scintillation camera</recid>
+<recid>content: title computer processing of dynamic images from an anger scintillation camera</recid>
 </hit>
 <hit>
 
@@ -77,6 +76,6 @@
 <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>
+<recid>content: title reconstruction tomography in diagnostic radiology and nuclear medicine</recid>
 </hit>
-</show>
+</show>
\ No newline at end of file
index 8755ee8..ebb8bb4 100644 (file)
@@ -1,5 +1,5 @@
-<termlist>
-<activeclients>0</activeclients>
+<?xml version="1.0" encoding="UTF-8"?>
+<termlist><activeclients>0</activeclients>
 <list name="xtargets">
 <term>
 <id>localhost:9999/db1</id>
@@ -32,4 +32,4 @@
 </list>
 <list name="medium">
 </list>
-</termlist>
+</termlist>
\ No newline at end of file
index 1ef9b8e..6bbd0d6 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<show>
-<status>OK</status>
+<show><status>OK</status>
 <activeclients>0</activeclients>
 <merged>1</merged>
 <total>4</total>
@@ -17,6 +16,6 @@
 <md-author>Jack Collins</md-author></location>
 <count>2</count>
 <relevance>240000</relevance>
-<recid>title how to program a computer author jack collins</recid>
+<recid>content: title how to program a computer author jack collins</recid>
 </hit>
-</show>
+</show>
\ No newline at end of file
index eb3828f..c6feb28 100644 (file)
@@ -3,8 +3,8 @@ http://localhost:9763/search.pz2?session=1&command=stat
 http://localhost:9763/search.pz2?session=1&command=ping
 http://localhost:9763/search.pz2?session=1&command=search&query=computer
 2 http://localhost:9763/search.pz2?session=1&command=show&block=1
-http://localhost:9763/search.pz2?session=1&command=record&id=title+how+to+program+a+computer+author+jack+collins+medium+book
-http://localhost:9763/search.pz2?session=1&command=record&id=title+how+to+program+a+computer+author+jack+collins+medium+book&offset=0
+http://localhost:9763/search.pz2?session=1&command=record&id=content%3A+title+how+to+program+a+computer+author+jack+collins+medium+book
+http://localhost:9763/search.pz2?session=1&command=record&id=content%3A+title+how+to+program+a+computer+author+jack+collins+medium+book&offset=0
 http://localhost:9763/search.pz2?session=1&command=show&start=0&number=1&sort=title:0
 http://localhost:9763/search.pz2?session=1&command=show&start=0&number=1&sort=title:1
 http://localhost:9763/search.pz2?session=1&command=show&start=0&number=1&sort=date:0
@@ -20,9 +20,9 @@ http://localhost:9763/search.pz2?session=2&command=search&query=kubiak%20stanis%
 http://localhost:9763/search.pz2?session=2&command=search&query=kubiak%20sts%C5%82aw
 2 http://localhost:9763/search.pz2?session=2&command=bytarget
 http://localhost:9763/search.pz2?session=1&command=search&query=computer
-1 http://localhost:9763/search.pz2?session=1&command=record&id=title+how+to+program+a+computer+author+jack+collins+medium+book
-http://localhost:9763/search.pz2?session=1&command=record&id=title+how+to+program+a+computer+author+jack+collins+medium+book&offset=0&binary=1
-http://localhost:9763/search.pz2?session=1&command=record&id=title+how+to+program+a+computer+author+jack+collins+medium+book&offset=0&binary=1&syntax=usmarc
+1 http://localhost:9763/search.pz2?session=1&command=record&id=content%3A+title+how+to+program+a+computer+author+jack+collins+medium+book
+http://localhost:9763/search.pz2?session=1&command=record&id=content%3A+title+how+to+program+a+computer+author+jack+collins+medium+book&offset=0&binary=1
+http://localhost:9763/search.pz2?session=1&command=record&id=content%3A+title+how+to+program+a+computer+author+jack+collins+medium+book&offset=0&binary=1&syntax=usmarc
 http://localhost:9763/search.pz2?command=init&service=gils
 http://localhost:9763/search.pz2?session=3&command=search&query=utah
 2 http://localhost:9763/search.pz2?session=3&command=show&block=1
@@ -43,12 +43,12 @@ http://localhost:9763/search.pz2?session=5&command=show&block=1
 http://localhost:9763/search.pz2?command=init&pz:elements%5Bz3950.indexdata.com%2Fmarc%5D=F
 1 http://localhost:9763/search.pz2?session=6&command=search&query=louis
 1 http://localhost:9763/search.pz2?session=6&command=show&block=1
-http://localhost:9763/search.pz2?session=6&command=record&id=title+computer+processing+of+dynamic+images+from+an+anger+scintillation+camera+author+medium+book&offset=0
+http://localhost:9763/search.pz2?session=6&command=record&id=content%3A+title+computer+processing+of+dynamic+images+from+an+anger+scintillation+camera+author+medium+book&offset=0
 http://localhost:9763/search.pz2?command=init&pz:elements%5Bz3950.indexdata.com%2Fmarc%5D=F
 http://localhost:9763/search.pz2?session=7&command=search&query=greece
 1 http://localhost:9763/search.pz2?session=7&command=show&block=1
 1 http://localhost:9763/search.pz2?session=6&command=show&block=1
-http://localhost:9763/search.pz2?session=6&command=record&id=title+computer+processing+of+dynamic+images+from+an+anger+scintillation+camera+author+medium+book&offset=0
+http://localhost:9763/search.pz2?session=6&command=record&id=content%3A+title+computer+processing+of+dynamic+images+from+an+anger+scintillation+camera+author+medium+book&offset=0
 http://localhost:9763/search.pz2?command=init
 http://localhost:9763/search.pz2?session=8&command=settings&pz:name%5Bz3950.indexdata.com%2Fmarc%5D=marc&pz:requestsyntax%5Bz3950.indexdata.com%2Fmarc%5D=usmarc&pz:nativesyntax%5Bz3950.indexdata.com%2Fmarc%5D=iso2709&pz:xslt%5Bz3950.indexdata.com%2Fmarc%5D=marc21%5Ftest.xsl&pz:recordfilter%5Bz3950.indexdata.com%2Fmarc%5D=date
 http://localhost:9763/search.pz2?session=8&command=search&query=xyzzyz
index 90fd4e3..7d0e680 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<show>
-<status>OK</status>
+<show><status>OK</status>
 <activeclients>0</activeclients>
 <merged>9</merged>
 <total>10</total>
@@ -18,7 +17,7 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title the computer bible author medium book</recid>
+<recid>content: title the computer bible author medium book</recid>
 </hit>
 <hit>
 
@@ -31,7 +30,7 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title computer science technology author medium book</recid>
+<recid>content: title computer science technology author medium book</recid>
 </hit>
 <hit>
 
@@ -46,7 +45,7 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title reconstruction tomography in diagnostic radiology and nuclear medicine author medium book</recid>
+<recid>content: title reconstruction tomography in diagnostic radiology and nuclear medicine author medium book</recid>
 </hit>
 <hit>
 
@@ -59,7 +58,7 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title the use of passwords for controlled access to computer resources author wood helen m medium book</recid>
+<recid>content: title the use of passwords for controlled access to computer resources author wood helen m medium book</recid>
 </hit>
 <hit>
 
@@ -74,7 +73,7 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title computer processing of dynamic images from an anger scintillation camera author medium book</recid>
+<recid>content: title computer processing of dynamic images from an anger scintillation camera author medium book</recid>
 </hit>
 <hit>
 
@@ -92,7 +91,7 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title the puget sound region author mairs john w medium book</recid>
+<recid>content: title the puget sound region author mairs john w medium book</recid>
 </hit>
 <hit>
 
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title a plan for community college computer development author medium book</recid>
+<recid>content: title a plan for community college computer development author medium book</recid>
 </hit>
 <hit>
 
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title washington metropolitan area rail computer feasibility study author englund carl r medium book</recid>
+<recid>content: title washington metropolitan area rail computer feasibility study author englund carl r medium book</recid>
 </hit>
 <hit>
 
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
 <count>2</count>
-<recid>title how to program a computer author jack collins medium book</recid>
+<recid>content: title how to program a computer author jack collins medium book</recid>
 </hit>
-</show>
+</show>
\ No newline at end of file
index 703dcfe..50799ac 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<show>
-<status>OK</status>
+<show><status>OK</status>
 <activeclients>0</activeclients>
 <merged>9</merged>
 <total>10</total>
@@ -17,7 +16,7 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title a plan for community college computer development author medium book</recid>
+<recid>content: title a plan for community college computer development author medium book</recid>
 </hit>
 <hit>
 
@@ -34,7 +33,7 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title washington metropolitan area rail computer feasibility study author englund carl r medium book</recid>
+<recid>content: title washington metropolitan area rail computer feasibility study author englund carl r medium book</recid>
 </hit>
 <hit>
 
@@ -48,7 +47,7 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title the computer bible author medium book</recid>
+<recid>content: title the computer bible author medium book</recid>
 </hit>
 <hit>
 
@@ -63,7 +62,7 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title computer processing of dynamic images from an anger scintillation camera author medium book</recid>
+<recid>content: title computer processing of dynamic images from an anger scintillation camera author medium book</recid>
 </hit>
 <hit>
 
@@ -81,7 +80,7 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title the puget sound region author mairs john w medium book</recid>
+<recid>content: title the puget sound region author mairs john w medium book</recid>
 </hit>
 <hit>
 
@@ -94,7 +93,7 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title computer science technology author medium book</recid>
+<recid>content: title computer science technology author medium book</recid>
 </hit>
 <hit>
 
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title reconstruction tomography in diagnostic radiology and nuclear medicine author medium book</recid>
+<recid>content: title reconstruction tomography in diagnostic radiology and nuclear medicine author medium book</recid>
 </hit>
 <hit>
 
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title the use of passwords for controlled access to computer resources author wood helen m medium book</recid>
+<recid>content: title the use of passwords for controlled access to computer resources author wood helen m medium book</recid>
 </hit>
 <hit>
 
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
 <count>2</count>
-<recid>title how to program a computer author jack collins medium book</recid>
+<recid>content: title how to program a computer author jack collins medium book</recid>
 </hit>
-</show>
+</show>
\ No newline at end of file
index d3b889f..5a1147b 100644 (file)
@@ -1,9 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<show>
-<status>OK</status>
+<show><status>OK</status>
 <activeclients>0</activeclients>
 <merged>0</merged>
 <total>0</total>
 <start>0</start>
 <num>0</num>
-</show>
+</show>
\ No newline at end of file
index d3b889f..5a1147b 100644 (file)
@@ -1,9 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<show>
-<status>OK</status>
+<show><status>OK</status>
 <activeclients>0</activeclients>
 <merged>0</merged>
 <total>0</total>
 <start>0</start>
 <num>0</num>
-</show>
+</show>
\ No newline at end of file
index 267fde6..0a48c50 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<show>
-<status>OK</status>
+<show><status>OK</status>
 <activeclients>0</activeclients>
 <merged>3</merged>
 <total>3</total>
@@ -16,7 +15,7 @@
 <md-test-usersetting-2>test-usersetting-2 data: 
 </md-test-usersetting-2></location>
 <relevance>9416</relevance>
-<recid>title bibliography of maine geology author medium book</recid>
+<recid>content: title bibliography of maine geology author medium book</recid>
 </hit>
 <hit>
 
@@ -28,7 +27,7 @@
 <md-test-usersetting-2>test-usersetting-2 data: 
 </md-test-usersetting-2></location>
 <relevance>0</relevance>
-<recid>title groundwater resource maps county series author medium book</recid>
+<recid>content: title groundwater resource maps county series author medium book</recid>
 </hit>
 <hit>
 
@@ -40,6 +39,6 @@
 <md-test-usersetting-2>test-usersetting-2 data: 
 </md-test-usersetting-2></location>
 <relevance>0</relevance>
-<recid>title oil gas drilling author medium book</recid>
+<recid>content: title oil gas drilling author medium book</recid>
 </hit>
-</show>
+</show>
\ No newline at end of file
index a3476cd..8845b1a 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <record>
-<recid>title how to program a computer author jack collins medium book</recid>
-<nextrecid>title computer processing of dynamic images from an anger scintillation camera author medium book</nextrecid>
+<recid>content: title how to program a computer author jack collins medium book</recid>
+<nextrecid>content: title computer processing of dynamic images from an anger scintillation camera author medium book</nextrecid>
 <activeclients>0</activeclients>
 
 <md-title>How to program a computer</md-title>
@@ -23,4 +23,4 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-</record>
+</record>
\ No newline at end of file
index fdb5227..bca8ca8 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<show>
-<status>OK</status>
+<show><status>OK</status>
 <activeclients>0</activeclients>
 <merged>3</merged>
 <total>17</total>
 <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>300000</relevance>
-<recid>title utah geochromometry author medium book</recid>
+<recid>content: title utah geochromometry 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>200000</relevance>
-<recid>title utah earthquake epicenters author medium book</recid>
+<recid>content: title utah earthquake epicenters 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>100000</relevance>
-<recid>title utah geological and mineral survey publications author medium book</recid>
+<recid>content: title utah geological and mineral survey publications author medium book</recid>
 </hit>
-</show>
+</show>
\ No newline at end of file
index 5c85987..d1e8a82 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<show>
-<status>OK</status>
+<show><status>OK</status>
 <activeclients>0</activeclients>
 <merged>3</merged>
 <total>3</total>
@@ -13,7 +12,7 @@
 <md-title>BIBLIOGRAPHY OF MAINE GEOLOGY</md-title>
 <md-description>This data base is a computer based bibliography of marine geology.  It allows searching by topic and geographic location, similar to GEOREF.  It is currently under development to replace the printed Bibliography of Marine Geology</md-description></location>
 <relevance>9416</relevance>
-<recid>title bibliography of maine geology</recid>
+<recid>content: title bibliography of maine geology</recid>
 </hit>
 <hit>
 
@@ -22,7 +21,7 @@
 <md-title>GROUNDWATER RESOURCE MAPS - COUNTY SERIES</md-title>
 <md-description>A series of 1:250,000 scale maps showing well yield, well depth, and depth to bedrock for a large number of bedrock wells inventoried by the Maine Geological Survey in the mid-to late 1970&apos;s comprises this data set.  Some series also show bedrock topography and potentiometric surface.  Geographic coverage is restricted to Southern Maine</md-description></location>
 <relevance>0</relevance>
-<recid>title groundwater resource maps county series</recid>
+<recid>content: title groundwater resource maps county series</recid>
 </hit>
 <hit>
 
@@ -31,6 +30,6 @@
 <md-title>OIL/GAS DRILLING</md-title>
 <md-description>This database contains information on oil and gas drilling such as well name, operator, driller, location, depth, copies of logs run, permits, samples (cuttings, core), completion records</md-description></location>
 <relevance>0</relevance>
-<recid>title oil gas drilling</recid>
+<recid>content: title oil gas drilling</recid>
 </hit>
-</show>
+</show>
\ No newline at end of file
index 6905e5a..e8ead75 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<show>
-<status>OK</status>
+<show><status>OK</status>
 <activeclients>0</activeclients>
 <merged>8</merged>
 <total>10</total>
@@ -18,7 +17,7 @@
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
 <relevance>26706</relevance>
-<recid>title computer science technology author medium book</recid>
+<recid>content: title computer science technology author medium book</recid>
 </hit>
 <hit>
 
@@ -33,7 +32,7 @@
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
 <relevance>26706</relevance>
-<recid>title the computer bible author medium book</recid>
+<recid>content: title the computer bible author medium book</recid>
 </hit>
 <hit>
 
@@ -47,7 +46,7 @@
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
 <relevance>11445</relevance>
-<recid>title a plan for community college computer development author medium book</recid>
+<recid>content: title a plan for community college computer development author medium book</recid>
 </hit>
 <hit>
 
@@ -65,7 +64,7 @@
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
 <relevance>11445</relevance>
-<recid>title washington metropolitan area rail computer feasibility study author englund carl r medium book</recid>
+<recid>content: title washington metropolitan area rail computer feasibility study author englund carl r medium book</recid>
 </hit>
 <hit>
 
@@ -84,7 +83,7 @@
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
 <relevance>11127</relevance>
-<recid>title the puget sound region author mairs john w medium book</recid>
+<recid>content: title the puget sound region author mairs john w medium book</recid>
 </hit>
 <hit>
 
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
 <relevance>8011</relevance>
-<recid>title computer processing of dynamic images from an anger scintillation camera author medium book</recid>
+<recid>content: title computer processing of dynamic images from an anger scintillation camera author medium book</recid>
 </hit>
 <hit>
 
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
 <relevance>8011</relevance>
-<recid>title the use of passwords for controlled access to computer resources author wood helen m medium book</recid>
+<recid>content: title the use of passwords for controlled access to computer resources author wood helen m medium book</recid>
 </hit>
 <hit>
 
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
 <relevance>0</relevance>
-<recid>title reconstruction tomography in diagnostic radiology and nuclear medicine author medium book</recid>
+<recid>content: title reconstruction tomography in diagnostic radiology and nuclear medicine author medium book</recid>
 </hit>
-</show>
+</show>
\ No newline at end of file
index ac7cb04..cc72d29 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<show>
-<status>OK</status>
+<show><status>OK</status>
 <activeclients>0</activeclients>
 <merged>8</merged>
 <total>31</total>
 <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>
+<recid>content: title applied geology file 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>
+<recid>content: title electric log library author medium book</recid>
 </hit>
 <hit>
 
 <md-title>ISOTOPIC DATES OF ROCKS AND MINERALS</md-title><location id="z3950.indexdata.com/gils" name="Index Data GILS test server">
 <md-title>ISOTOPIC DATES OF ROCKS AND MINERALS</md-title></location>
 <relevance>0</relevance>
-<recid>title isotopic dates of rocks and minerals author medium book</recid>
+<recid>content: title isotopic dates of rocks and minerals 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>
+<recid>content: title mine map index 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>0</relevance>
-<recid>title utah crib file author medium book</recid>
+<recid>content: 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>0</relevance>
-<recid>title utah earthquake epicenters author medium book</recid>
+<recid>content: title utah earthquake epicenters 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>0</relevance>
-<recid>title utah geologic map bibliography author medium book</recid>
+<recid>content: title utah geologic map bibliography 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>0</relevance>
-<recid>title utah geological and mineral survey publications author medium book</recid>
+<recid>content: title utah geological and mineral survey publications author medium book</recid>
 </hit>
-</show>
+</show>
\ No newline at end of file
index 9893c49..67eb248 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<show>
-<status>OK</status>
+<show><status>OK</status>
 <activeclients>0</activeclients>
 <merged>5</merged>
 <total>12</total>
@@ -21,7 +20,7 @@
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
 <relevance>174545</relevance>
-<recid>title the religious teachers of greece author adam james medium book</recid>
+<recid>content: title the religious teachers of greece author adam james medium book</recid>
 </hit>
 <hit>
 
@@ -40,7 +39,7 @@
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
 <relevance>150000</relevance>
-<recid>title the puget sound region author mairs john w medium book</recid>
+<recid>content: title the puget sound region author mairs john w medium book</recid>
 </hit>
 <hit>
 
@@ -56,7 +55,7 @@
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
 <relevance>125000</relevance>
-<recid>title reconstruction tomography in diagnostic radiology and nuclear medicine author medium book</recid>
+<recid>content: title reconstruction tomography in diagnostic radiology and nuclear medicine author medium book</recid>
 </hit>
 <hit>
 
@@ -70,7 +69,7 @@
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
 <relevance>60000</relevance>
-<recid>title the use of passwords for controlled access to computer resources author wood helen m medium book</recid>
+<recid>content: title the use of passwords for controlled access to computer resources author wood helen m medium book</recid>
 </hit>
 <hit>
 
@@ -84,6 +83,6 @@
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
 <relevance>35714</relevance>
-<recid>title computer science technology author medium book</recid>
+<recid>content: title computer science technology author medium book</recid>
 </hit>
-</show>
+</show>
\ No newline at end of file
index 2b89580..f4f9579 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<show>
-<status>OK</status>
+<show><status>OK</status>
 <activeclients>0</activeclients>
 <merged>1</merged>
 <total>1</total>
@@ -20,6 +19,6 @@
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
 <relevance>0</relevance>
-<recid>title computer processing of dynamic images from an anger scintillation camera author medium book</recid>
+<recid>content: title computer processing of dynamic images from an anger scintillation camera author medium book</recid>
 </hit>
-</show>
+</show>
\ No newline at end of file
index 43fcf8b..ecb7374 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<show>
-<status>OK</status>
+<show><status>OK</status>
 <activeclients>0</activeclients>
 <merged>1</merged>
 <total>1</total>
@@ -21,6 +20,6 @@
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
 <relevance>120000</relevance>
-<recid>title the religious teachers of greece author adam james medium book</recid>
+<recid>content: title the religious teachers of greece author adam james medium book</recid>
 </hit>
-</show>
+</show>
\ No newline at end of file
index a884f56..1c1d8d3 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<show>
-<status>OK</status>
+<show><status>OK</status>
 <activeclients>0</activeclients>
 <merged>9</merged>
 <total>10</total>
@@ -23,7 +22,7 @@
         YYYYYYYYY</md-test-usersetting-2></location>
 <count>2</count>
 <relevance>25286</relevance>
-<recid>title how to program a computer author jack collins medium book</recid>
+<recid>content: title how to program a computer author jack collins medium book</recid>
 </hit>
 <hit>
 
@@ -37,7 +36,7 @@
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
 <relevance>21072</relevance>
-<recid>title computer science technology author medium book</recid>
+<recid>content: title computer science technology author medium book</recid>
 </hit>
 <hit>
 
@@ -52,7 +51,7 @@
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
 <relevance>21072</relevance>
-<recid>title the computer bible author medium book</recid>
+<recid>content: title the computer bible author medium book</recid>
 </hit>
 <hit>
 
@@ -66,7 +65,7 @@
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
 <relevance>9030</relevance>
-<recid>title a plan for community college computer development author medium book</recid>
+<recid>content: title a plan for community college computer development author medium book</recid>
 </hit>
 <hit>
 
@@ -84,7 +83,7 @@
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
 <relevance>9030</relevance>
-<recid>title washington metropolitan area rail computer feasibility study author englund carl r medium book</recid>
+<recid>content: title washington metropolitan area rail computer feasibility study author englund carl r medium book</recid>
 </hit>
 <hit>
 
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
 <relevance>8780</relevance>
-<recid>title the puget sound region author mairs john w medium book</recid>
+<recid>content: title the puget sound region author mairs john w medium book</recid>
 </hit>
 <hit>
 
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
 <relevance>6321</relevance>
-<recid>title computer processing of dynamic images from an anger scintillation camera author medium book</recid>
+<recid>content: title computer processing of dynamic images from an anger scintillation camera author medium book</recid>
 </hit>
 <hit>
 
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
 <relevance>6321</relevance>
-<recid>title the use of passwords for controlled access to computer resources author wood helen m medium book</recid>
+<recid>content: title the use of passwords for controlled access to computer resources author wood helen m medium book</recid>
 </hit>
 <hit>
 
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
 <relevance>0</relevance>
-<recid>title reconstruction tomography in diagnostic radiology and nuclear medicine author medium book</recid>
+<recid>content: title reconstruction tomography in diagnostic radiology and nuclear medicine author medium book</recid>
 </hit>
-</show>
+</show>
\ No newline at end of file
index 2b89580..f4f9579 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<show>
-<status>OK</status>
+<show><status>OK</status>
 <activeclients>0</activeclients>
 <merged>1</merged>
 <total>1</total>
@@ -20,6 +19,6 @@
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
 <relevance>0</relevance>
-<recid>title computer processing of dynamic images from an anger scintillation camera author medium book</recid>
+<recid>content: title computer processing of dynamic images from an anger scintillation camera author medium book</recid>
 </hit>
-</show>
+</show>
\ No newline at end of file
index d3b889f..5a1147b 100644 (file)
@@ -1,9 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<show>
-<status>OK</status>
+<show><status>OK</status>
 <activeclients>0</activeclients>
 <merged>0</merged>
 <total>0</total>
 <start>0</start>
 <num>0</num>
-</show>
+</show>
\ No newline at end of file
index d3b889f..5a1147b 100644 (file)
@@ -1,9 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<show>
-<status>OK</status>
+<show><status>OK</status>
 <activeclients>0</activeclients>
 <merged>0</merged>
 <total>0</total>
 <start>0</start>
 <num>0</num>
-</show>
+</show>
\ No newline at end of file
index f079915..f2a707c 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <record>
-<recid>title how to program a computer author jack collins medium book</recid>
-<nextrecid>title computer science technology author medium book</nextrecid>
+<recid>content: title how to program a computer author jack collins medium book</recid>
+<nextrecid>content: title computer science technology author medium book</nextrecid>
 <activeclients>0</activeclients>
 
 <md-title>How to program a computer</md-title>
@@ -23,4 +23,4 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-</record>
+</record>
\ No newline at end of file
index f6ca445..28b128f 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<show>
-<status>OK</status>
+<show><status>OK</status>
 <activeclients>0</activeclients>
 <merged>1</merged>
 <total>1</total>
@@ -21,6 +20,6 @@
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
 <relevance>320000</relevance>
-<recid>title the religious teachers of greece author adam james medium book</recid>
+<recid>content: title the religious teachers of greece author adam james medium book</recid>
 </hit>
-</show>
+</show>
\ No newline at end of file
index 43fcf8b..ecb7374 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<show>
-<status>OK</status>
+<show><status>OK</status>
 <activeclients>0</activeclients>
 <merged>1</merged>
 <total>1</total>
@@ -21,6 +20,6 @@
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
 <relevance>120000</relevance>
-<recid>title the religious teachers of greece author adam james medium book</recid>
+<recid>content: title the religious teachers of greece author adam james medium book</recid>
 </hit>
-</show>
+</show>
\ No newline at end of file
index 84feb43..5375925 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<show>
-<status>OK</status>
+<show><status>OK</status>
 <activeclients>0</activeclients>
 <merged>9</merged>
 <total>10</total>
@@ -21,7 +20,7 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title washington metropolitan area rail computer feasibility study author englund carl r medium book</recid>
+<recid>content: title washington metropolitan area rail computer feasibility study author englund carl r medium book</recid>
 </hit>
 <hit>
 
@@ -34,7 +33,7 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title the use of passwords for controlled access to computer resources author wood helen m medium book</recid>
+<recid>content: title the use of passwords for controlled access to computer resources author wood helen m medium book</recid>
 </hit>
 <hit>
 
@@ -49,7 +48,7 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title reconstruction tomography in diagnostic radiology and nuclear medicine author medium book</recid>
+<recid>content: title reconstruction tomography in diagnostic radiology and nuclear medicine author medium book</recid>
 </hit>
 <hit>
 
@@ -67,7 +66,7 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title the puget sound region author mairs john w medium book</recid>
+<recid>content: title the puget sound region author mairs john w medium book</recid>
 </hit>
 <hit>
 
@@ -80,7 +79,7 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title a plan for community college computer development author medium book</recid>
+<recid>content: title a plan for community college computer development author medium book</recid>
 </hit>
 <hit>
 
@@ -98,7 +97,7 @@
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
 <count>2</count>
-<recid>title how to program a computer author jack collins medium book</recid>
+<recid>content: title how to program a computer author jack collins medium book</recid>
 </hit>
 <hit>
 
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title computer science technology author medium book</recid>
+<recid>content: title computer science technology author medium book</recid>
 </hit>
 <hit>
 
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title computer processing of dynamic images from an anger scintillation camera author medium book</recid>
+<recid>content: title computer processing of dynamic images from an anger scintillation camera author medium book</recid>
 </hit>
 <hit>
 
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title the computer bible author medium book</recid>
+<recid>content: title the computer bible author medium book</recid>
 </hit>
-</show>
+</show>
\ No newline at end of file
index 407ac56..fcefa9b 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<show>
-<status>OK</status>
+<show><status>OK</status>
 <activeclients>0</activeclients>
 <merged>9</merged>
 <total>10</total>
@@ -18,7 +17,7 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title the computer bible author medium book</recid>
+<recid>content: title the computer bible author medium book</recid>
 </hit>
 <hit>
 
@@ -33,7 +32,7 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title computer processing of dynamic images from an anger scintillation camera author medium book</recid>
+<recid>content: title computer processing of dynamic images from an anger scintillation camera author medium book</recid>
 </hit>
 <hit>
 
@@ -46,7 +45,7 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title computer science technology author medium book</recid>
+<recid>content: title computer science technology author medium book</recid>
 </hit>
 <hit>
 
@@ -64,7 +63,7 @@
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
 <count>2</count>
-<recid>title how to program a computer author jack collins medium book</recid>
+<recid>content: title how to program a computer author jack collins medium book</recid>
 </hit>
 <hit>
 
@@ -77,7 +76,7 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title a plan for community college computer development author medium book</recid>
+<recid>content: title a plan for community college computer development author medium book</recid>
 </hit>
 <hit>
 
@@ -95,7 +94,7 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title the puget sound region author mairs john w medium book</recid>
+<recid>content: title the puget sound region author mairs john w medium book</recid>
 </hit>
 <hit>
 
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title reconstruction tomography in diagnostic radiology and nuclear medicine author medium book</recid>
+<recid>content: title reconstruction tomography in diagnostic radiology and nuclear medicine author medium book</recid>
 </hit>
 <hit>
 
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title the use of passwords for controlled access to computer resources author wood helen m medium book</recid>
+<recid>content: title the use of passwords for controlled access to computer resources author wood helen m medium book</recid>
 </hit>
 <hit>
 
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title washington metropolitan area rail computer feasibility study author englund carl r medium book</recid>
+<recid>content: title washington metropolitan area rail computer feasibility study author englund carl r medium book</recid>
 </hit>
-</show>
+</show>
\ No newline at end of file
index 00a481a..bf54b7a 100644 (file)
@@ -1,5 +1,5 @@
-<termlist>
-<activeclients>0</activeclients>
+<?xml version="1.0" encoding="UTF-8"?>
+<termlist><activeclients>0</activeclients>
 <list name="xtargets">
 <term>
 <id>z3950.indexdata.com/marc</id>
@@ -9,4 +9,4 @@
 <diagnostic>0</diagnostic>
 </term>
 </list>
-</termlist>
+</termlist>
\ No newline at end of file
index 84feb43..5375925 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<show>
-<status>OK</status>
+<show><status>OK</status>
 <activeclients>0</activeclients>
 <merged>9</merged>
 <total>10</total>
@@ -21,7 +20,7 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title washington metropolitan area rail computer feasibility study author englund carl r medium book</recid>
+<recid>content: title washington metropolitan area rail computer feasibility study author englund carl r medium book</recid>
 </hit>
 <hit>
 
@@ -34,7 +33,7 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title the use of passwords for controlled access to computer resources author wood helen m medium book</recid>
+<recid>content: title the use of passwords for controlled access to computer resources author wood helen m medium book</recid>
 </hit>
 <hit>
 
@@ -49,7 +48,7 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title reconstruction tomography in diagnostic radiology and nuclear medicine author medium book</recid>
+<recid>content: title reconstruction tomography in diagnostic radiology and nuclear medicine author medium book</recid>
 </hit>
 <hit>
 
@@ -67,7 +66,7 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title the puget sound region author mairs john w medium book</recid>
+<recid>content: title the puget sound region author mairs john w medium book</recid>
 </hit>
 <hit>
 
@@ -80,7 +79,7 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title a plan for community college computer development author medium book</recid>
+<recid>content: title a plan for community college computer development author medium book</recid>
 </hit>
 <hit>
 
@@ -98,7 +97,7 @@
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
 <count>2</count>
-<recid>title how to program a computer author jack collins medium book</recid>
+<recid>content: title how to program a computer author jack collins medium book</recid>
 </hit>
 <hit>
 
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title computer science technology author medium book</recid>
+<recid>content: title computer science technology author medium book</recid>
 </hit>
 <hit>
 
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title computer processing of dynamic images from an anger scintillation camera author medium book</recid>
+<recid>content: title computer processing of dynamic images from an anger scintillation camera author medium book</recid>
 </hit>
 <hit>
 
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title the computer bible author medium book</recid>
+<recid>content: title the computer bible author medium book</recid>
 </hit>
-</show>
+</show>
\ No newline at end of file
index 407ac56..fcefa9b 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<show>
-<status>OK</status>
+<show><status>OK</status>
 <activeclients>0</activeclients>
 <merged>9</merged>
 <total>10</total>
@@ -18,7 +17,7 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title the computer bible author medium book</recid>
+<recid>content: title the computer bible author medium book</recid>
 </hit>
 <hit>
 
@@ -33,7 +32,7 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title computer processing of dynamic images from an anger scintillation camera author medium book</recid>
+<recid>content: title computer processing of dynamic images from an anger scintillation camera author medium book</recid>
 </hit>
 <hit>
 
@@ -46,7 +45,7 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title computer science technology author medium book</recid>
+<recid>content: title computer science technology author medium book</recid>
 </hit>
 <hit>
 
@@ -64,7 +63,7 @@
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
 <count>2</count>
-<recid>title how to program a computer author jack collins medium book</recid>
+<recid>content: title how to program a computer author jack collins medium book</recid>
 </hit>
 <hit>
 
@@ -77,7 +76,7 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title a plan for community college computer development author medium book</recid>
+<recid>content: title a plan for community college computer development author medium book</recid>
 </hit>
 <hit>
 
@@ -95,7 +94,7 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title the puget sound region author mairs john w medium book</recid>
+<recid>content: title the puget sound region author mairs john w medium book</recid>
 </hit>
 <hit>
 
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title reconstruction tomography in diagnostic radiology and nuclear medicine author medium book</recid>
+<recid>content: title reconstruction tomography in diagnostic radiology and nuclear medicine author medium book</recid>
 </hit>
 <hit>
 
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title the use of passwords for controlled access to computer resources author wood helen m medium book</recid>
+<recid>content: title the use of passwords for controlled access to computer resources author wood helen m medium book</recid>
 </hit>
 <hit>
 
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title washington metropolitan area rail computer feasibility study author englund carl r medium book</recid>
+<recid>content: title washington metropolitan area rail computer feasibility study author englund carl r medium book</recid>
 </hit>
-</show>
+</show>
\ No newline at end of file
index 90fd4e3..7d0e680 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<show>
-<status>OK</status>
+<show><status>OK</status>
 <activeclients>0</activeclients>
 <merged>9</merged>
 <total>10</total>
@@ -18,7 +17,7 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title the computer bible author medium book</recid>
+<recid>content: title the computer bible author medium book</recid>
 </hit>
 <hit>
 
@@ -31,7 +30,7 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title computer science technology author medium book</recid>
+<recid>content: title computer science technology author medium book</recid>
 </hit>
 <hit>
 
@@ -46,7 +45,7 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title reconstruction tomography in diagnostic radiology and nuclear medicine author medium book</recid>
+<recid>content: title reconstruction tomography in diagnostic radiology and nuclear medicine author medium book</recid>
 </hit>
 <hit>
 
@@ -59,7 +58,7 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title the use of passwords for controlled access to computer resources author wood helen m medium book</recid>
+<recid>content: title the use of passwords for controlled access to computer resources author wood helen m medium book</recid>
 </hit>
 <hit>
 
@@ -74,7 +73,7 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title computer processing of dynamic images from an anger scintillation camera author medium book</recid>
+<recid>content: title computer processing of dynamic images from an anger scintillation camera author medium book</recid>
 </hit>
 <hit>
 
@@ -92,7 +91,7 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title the puget sound region author mairs john w medium book</recid>
+<recid>content: title the puget sound region author mairs john w medium book</recid>
 </hit>
 <hit>
 
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title a plan for community college computer development author medium book</recid>
+<recid>content: title a plan for community college computer development author medium book</recid>
 </hit>
 <hit>
 
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title washington metropolitan area rail computer feasibility study author englund carl r medium book</recid>
+<recid>content: title washington metropolitan area rail computer feasibility study author englund carl r medium book</recid>
 </hit>
 <hit>
 
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
 <count>2</count>
-<recid>title how to program a computer author jack collins medium book</recid>
+<recid>content: title how to program a computer author jack collins medium book</recid>
 </hit>
-</show>
+</show>
\ No newline at end of file
index 703dcfe..50799ac 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<show>
-<status>OK</status>
+<show><status>OK</status>
 <activeclients>0</activeclients>
 <merged>9</merged>
 <total>10</total>
@@ -17,7 +16,7 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title a plan for community college computer development author medium book</recid>
+<recid>content: title a plan for community college computer development author medium book</recid>
 </hit>
 <hit>
 
@@ -34,7 +33,7 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title washington metropolitan area rail computer feasibility study author englund carl r medium book</recid>
+<recid>content: title washington metropolitan area rail computer feasibility study author englund carl r medium book</recid>
 </hit>
 <hit>
 
@@ -48,7 +47,7 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title the computer bible author medium book</recid>
+<recid>content: title the computer bible author medium book</recid>
 </hit>
 <hit>
 
@@ -63,7 +62,7 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title computer processing of dynamic images from an anger scintillation camera author medium book</recid>
+<recid>content: title computer processing of dynamic images from an anger scintillation camera author medium book</recid>
 </hit>
 <hit>
 
@@ -81,7 +80,7 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title the puget sound region author mairs john w medium book</recid>
+<recid>content: title the puget sound region author mairs john w medium book</recid>
 </hit>
 <hit>
 
@@ -94,7 +93,7 @@
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title computer science technology author medium book</recid>
+<recid>content: title computer science technology author medium book</recid>
 </hit>
 <hit>
 
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title reconstruction tomography in diagnostic radiology and nuclear medicine author medium book</recid>
+<recid>content: title reconstruction tomography in diagnostic radiology and nuclear medicine author medium book</recid>
 </hit>
 <hit>
 
 <md-test-usersetting>XXXXXXXXXX</md-test-usersetting>
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
-<recid>title the use of passwords for controlled access to computer resources author wood helen m medium book</recid>
+<recid>content: title the use of passwords for controlled access to computer resources author wood helen m medium book</recid>
 </hit>
 <hit>
 
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
 <count>2</count>
-<recid>title how to program a computer author jack collins medium book</recid>
+<recid>content: title how to program a computer author jack collins medium book</recid>
 </hit>
-</show>
+</show>
\ No newline at end of file
index b816997..80dde63 100644 (file)
@@ -1,5 +1,5 @@
-<termlist>
-<activeclients>0</activeclients>
+<?xml version="1.0" encoding="UTF-8"?>
+<termlist><activeclients>0</activeclients>
 <list name="author">
 <term><name>Jack Collins</name><frequency>2</frequency></term>
 <term><name>Englund, Carl R.</name><frequency>1</frequency></term>
@@ -18,4 +18,4 @@
 <term><name>Tomography</name><frequency>1</frequency></term>
 <term><name>Universities And Colleges</name><frequency>1</frequency></term>
 </list>
-</termlist>
+</termlist>
\ No newline at end of file
index f09bc0a..f03fbd3 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<show>
-<status>OK</status>
+<show><status>OK</status>
 <activeclients>0</activeclients>
 <merged>9</merged>
 <total>10</total>
@@ -18,7 +17,7 @@
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
 <relevance>37929</relevance>
-<recid>title the use of passwords for controlled access to computer resources author wood helen m medium book</recid>
+<recid>content: title the use of passwords for controlled access to computer resources author wood helen m medium book</recid>
 </hit>
 <hit>
 
@@ -37,7 +36,7 @@
         YYYYYYYYY</md-test-usersetting-2></location>
 <count>2</count>
 <relevance>25286</relevance>
-<recid>title how to program a computer author jack collins medium book</recid>
+<recid>content: title how to program a computer author jack collins medium book</recid>
 </hit>
 <hit>
 
@@ -52,7 +51,7 @@
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
 <relevance>21072</relevance>
-<recid>title the computer bible author medium book</recid>
+<recid>content: title the computer bible author medium book</recid>
 </hit>
 <hit>
 
@@ -66,7 +65,7 @@
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
 <relevance>15804</relevance>
-<recid>title computer science technology author medium book</recid>
+<recid>content: title computer science technology author medium book</recid>
 </hit>
 <hit>
 
@@ -80,7 +79,7 @@
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
 <relevance>9030</relevance>
-<recid>title a plan for community college computer development author medium book</recid>
+<recid>content: title a plan for community college computer development author medium book</recid>
 </hit>
 <hit>
 
@@ -98,7 +97,7 @@
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
 <relevance>9030</relevance>
-<recid>title washington metropolitan area rail computer feasibility study author englund carl r medium book</recid>
+<recid>content: title washington metropolitan area rail computer feasibility study author englund carl r medium book</recid>
 </hit>
 <hit>
 
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
 <relevance>8780</relevance>
-<recid>title the puget sound region author mairs john w medium book</recid>
+<recid>content: title the puget sound region author mairs john w medium book</recid>
 </hit>
 <hit>
 
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
 <relevance>6321</relevance>
-<recid>title computer processing of dynamic images from an anger scintillation camera author medium book</recid>
+<recid>content: title computer processing of dynamic images from an anger scintillation camera author medium book</recid>
 </hit>
 <hit>
 
 <md-test-usersetting-2>test-usersetting-2 data: 
         YYYYYYYYY</md-test-usersetting-2></location>
 <relevance>0</relevance>
-<recid>title reconstruction tomography in diagnostic radiology and nuclear medicine author medium book</recid>
+<recid>content: title reconstruction tomography in diagnostic radiology and nuclear medicine author medium book</recid>
 </hit>
-</show>
+</show>
\ No newline at end of file
index 4ad81c0..9caed57 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<show>
-<status>OK</status>
+<show><status>OK</status>
 <activeclients>0</activeclients>
 <merged>9</merged>
 <total>10</total>
@@ -17,7 +16,7 @@
 <md-author>Jack Collins</md-author></location>
 <count>2</count>
 <relevance>25286</relevance>
-<recid>title how to program a computer author jack collins medium book</recid>
+<recid>content: title how to program a computer author jack collins medium book</recid>
 </hit>
 <hit>
 
@@ -28,7 +27,7 @@
 <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>21072</relevance>
-<recid>title computer science technology author medium book</recid>
+<recid>content: title computer science technology author medium book</recid>
 </hit>
 <hit>
 
@@ -37,7 +36,7 @@
 <md-title>The Computer Bible</md-title>
 <md-date>1973-1980</md-date></location>
 <relevance>21072</relevance>
-<recid>title the computer bible author medium book</recid>
+<recid>content: title the computer bible author medium book</recid>
 </hit>
 <hit>
 
@@ -46,7 +45,7 @@
 <md-title>A plan for community college computer development</md-title>
 <md-date>1971</md-date></location>
 <relevance>9030</relevance>
-<recid>title a plan for community college computer development author medium book</recid>
+<recid>content: title a plan for community college computer development author medium book</recid>
 </hit>
 <hit>
 
@@ -59,7 +58,7 @@
 <md-date>1971</md-date>
 <md-author>Englund, Carl R</md-author></location>
 <relevance>9030</relevance>
-<recid>title washington metropolitan area rail computer feasibility study author englund carl r medium book</recid>
+<recid>content: title washington metropolitan area rail computer feasibility study author englund carl r medium book</recid>
 </hit>
 <hit>
 
@@ -72,7 +71,7 @@
 <md-date>1974</md-date>
 <md-author>Mairs, John W</md-author></location>
 <relevance>8780</relevance>
-<recid>title the puget sound region author mairs john w medium book</recid>
+<recid>content: title the puget sound region author mairs john w medium book</recid>
 </hit>
 <hit>
 
@@ -83,7 +82,7 @@
 <md-title-remainder>the proceedings of a workshop</md-title-remainder>
 <md-date>1974</md-date></location>
 <relevance>6321</relevance>
-<recid>title computer processing of dynamic images from an anger scintillation camera author medium book</recid>
+<recid>content: title computer processing of dynamic images from an anger scintillation camera author medium book</recid>
 </hit>
 <hit>
 
@@ -94,7 +93,7 @@
 <md-date>1977</md-date>
 <md-author>Wood, Helen M</md-author></location>
 <relevance>6321</relevance>
-<recid>title the use of passwords for controlled access to computer resources author wood helen m medium book</recid>
+<recid>content: title the use of passwords for controlled access to computer resources author wood helen m medium book</recid>
 </hit>
 <hit>
 
 <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 author medium book</recid>
+<recid>content: title reconstruction tomography in diagnostic radiology and nuclear medicine author medium book</recid>
 </hit>
-</show>
+</show>
\ No newline at end of file
index 4ad81c0..9caed57 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<show>
-<status>OK</status>
+<show><status>OK</status>
 <activeclients>0</activeclients>
 <merged>9</merged>
 <total>10</total>
@@ -17,7 +16,7 @@
 <md-author>Jack Collins</md-author></location>
 <count>2</count>
 <relevance>25286</relevance>
-<recid>title how to program a computer author jack collins medium book</recid>
+<recid>content: title how to program a computer author jack collins medium book</recid>
 </hit>
 <hit>
 
@@ -28,7 +27,7 @@
 <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>21072</relevance>
-<recid>title computer science technology author medium book</recid>
+<recid>content: title computer science technology author medium book</recid>
 </hit>
 <hit>
 
@@ -37,7 +36,7 @@
 <md-title>The Computer Bible</md-title>
 <md-date>1973-1980</md-date></location>
 <relevance>21072</relevance>
-<recid>title the computer bible author medium book</recid>
+<recid>content: title the computer bible author medium book</recid>
 </hit>
 <hit>
 
@@ -46,7 +45,7 @@
 <md-title>A plan for community college computer development</md-title>
 <md-date>1971</md-date></location>
 <relevance>9030</relevance>
-<recid>title a plan for community college computer development author medium book</recid>
+<recid>content: title a plan for community college computer development author medium book</recid>
 </hit>
 <hit>
 
@@ -59,7 +58,7 @@
 <md-date>1971</md-date>
 <md-author>Englund, Carl R</md-author></location>
 <relevance>9030</relevance>
-<recid>title washington metropolitan area rail computer feasibility study author englund carl r medium book</recid>
+<recid>content: title washington metropolitan area rail computer feasibility study author englund carl r medium book</recid>
 </hit>
 <hit>
 
@@ -72,7 +71,7 @@
 <md-date>1974</md-date>
 <md-author>Mairs, John W</md-author></location>
 <relevance>8780</relevance>
-<recid>title the puget sound region author mairs john w medium book</recid>
+<recid>content: title the puget sound region author mairs john w medium book</recid>
 </hit>
 <hit>
 
@@ -83,7 +82,7 @@
 <md-title-remainder>the proceedings of a workshop</md-title-remainder>
 <md-date>1974</md-date></location>
 <relevance>6321</relevance>
-<recid>title computer processing of dynamic images from an anger scintillation camera author medium book</recid>
+<recid>content: title computer processing of dynamic images from an anger scintillation camera author medium book</recid>
 </hit>
 <hit>
 
@@ -94,7 +93,7 @@
 <md-date>1977</md-date>
 <md-author>Wood, Helen M</md-author></location>
 <relevance>6321</relevance>
-<recid>title the use of passwords for controlled access to computer resources author wood helen m medium book</recid>
+<recid>content: title the use of passwords for controlled access to computer resources author wood helen m medium book</recid>
 </hit>
 <hit>
 
 <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 author medium book</recid>
+<recid>content: title reconstruction tomography in diagnostic radiology and nuclear medicine author medium book</recid>
 </hit>
-</show>
+</show>
\ No newline at end of file
index e28d1a8..8b8d4ac 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<show>
-<status>OK</status>
+<show><status>OK</status>
 <activeclients>0</activeclients>
 <merged>3</merged>
 <total>3</total>
 <md-title>BIBLIOGRAPHY OF MAINE GEOLOGY</md-title><location id="z3950.indexdata.com/gils" name="Index Data GILS test server">
 <md-title>BIBLIOGRAPHY OF MAINE GEOLOGY</md-title></location>
 <relevance>0</relevance>
-<recid>title bibliography of maine geology author medium book</recid>
+<recid>content: title bibliography of maine geology author medium book</recid>
 </hit>
 <hit>
 
 <md-title>GROUNDWATER RESOURCE MAPS - COUNTY SERIES</md-title><location id="z3950.indexdata.com/gils" name="Index Data GILS test server">
 <md-title>GROUNDWATER RESOURCE MAPS - COUNTY SERIES</md-title></location>
 <relevance>0</relevance>
-<recid>title groundwater resource maps county series author medium book</recid>
+<recid>content: title groundwater resource maps county series author medium book</recid>
 </hit>
 <hit>
 
 <md-title>OIL/GAS DRILLING</md-title><location id="z3950.indexdata.com/gils" name="Index Data GILS test server">
 <md-title>OIL/GAS DRILLING</md-title></location>
 <relevance>0</relevance>
-<recid>title oil gas drilling author medium book</recid>
+<recid>content: title oil gas drilling author medium book</recid>
 </hit>
-</show>
+</show>
\ No newline at end of file
index 1ce919e..4518018 100644 (file)
@@ -1,5 +1,5 @@
 http://localhost:9763/search.pz2?command=init&clear=1
-http://localhost:9763/search.pz2?session=1&command=settings&pz%3Atermlist_term_count%5Bocs-test.indexdata.com%2Fsolr%2Fselect%5D=10&use_url_proxy%5Bocs-test.indexdata.com%2Fsolr%2Fselect%5D=0&pz%3Apiggyback%5Bocs-test.indexdata.com%2Fsolr%2Fselect%5D=1&pz%3Apreferred%5Bocs-test.indexdata.com%2Fsolr%2Fselect%5D=1&pz%3Acclmap%3Asu%5Bocs-test.indexdata.com%2Fsolr%2Fselect%5D=1%3Dsubject&pz%3Asru%5Bocs-test.indexdata.com%2Fsolr%2Fselect%5D=solr&use_thumbnails%5Bocs-test.indexdata.com%2Fsolr%2Fselect%5D=0&pz%3Acclmap%3Adate%5Bocs-test.indexdata.com%2Fsolr%2Fselect%5D=1%3Ddate&medium%5Bocs-test.indexdata.com%2Fsolr%2Fselect%5D=web&pz%3Aname%5Bocs-test.indexdata.com%2Fsolr%2Fselect%5D=ocs_test&pz%3Acclmap%3Aissn%5Bocs-test.indexdata.com%2Fsolr%2Fselect%5D=u%3D8&pz%3Acclmap%3Ati%5Bocs-test.indexdata.com%2Fsolr%2Fselect%5D=1%3Dtitle&pz%3Acclmap%3Aau%5Bocs-test.indexdata.com%2Fsolr%2Fselect%5D=1%3Dauthor&pz%3Axslt%5Bocs-test.indexdata.com%2Fsolr%2Fselect%5D=solr-pz2.xsl&pz%3Acclmap%3Aterm%5Bocs-test.indexdata.com%2Fsolr%2Fselect%5D=1%3Dtext+s%3Dal&pz%3Acclmap%3Aisbn%5Bocs-test.indexdata.com%2Fsolr%2Fselect%5D=1%3Disbn&pz%3Aqueryencoding%5Bocs-test.indexdata.com%2Fsolr%2Fselect%5D=UTF-8&pz%3Aoption_recordfilter%5Bocs-test.indexdata.com%2Fsolr%2Fselect%5D=remote
+http://localhost:9763/search.pz2?session=1&command=settings&pz%3Atermlist_term_count%5Bocs-test.indexdata.com%2Fsolr%2Fselect%5D=10&use_url_proxy%5Bocs-test.indexdata.com%2Fsolr%2Fselect%5D=0&pz%3Apiggyback%5Bocs-test.indexdata.com%2Fsolr%2Fselect%5D=1&pz%3Apreferred%5Bocs-test.indexdata.com%2Fsolr%2Fselect%5D=1&pz%3Acclmap%3Asu%5Bocs-test.indexdata.com%2Fsolr%2Fselect%5D=1%3Dsubject&pz%3Asru%5Bocs-test.indexdata.com%2Fsolr%2Fselect%5D=solr&use_thumbnails%5Bocs-test.indexdata.com%2Fsolr%2Fselect%5D=0&pz%3Acclmap%3Adate%5Bocs-test.indexdata.com%2Fsolr%2Fselect%5D=1%3Ddate&medium%5Bocs-test.indexdata.com%2Fsolr%2Fselect%5D=web&pz%3Aname%5Bocs-test.indexdata.com%2Fsolr%2Fselect%5D=ocs_test&pz%3Acclmap%3Aissn%5Bocs-test.indexdata.com%2Fsolr%2Fselect%5D=u%3D8&pz%3Acclmap%3Ati%5Bocs-test.indexdata.com%2Fsolr%2Fselect%5D=1%3Dtitle&pz%3Acclmap%3Aau%5Bocs-test.indexdata.com%2Fsolr%2Fselect%5D=1%3Dauthor&pz%3Axslt%5Bocs-test.indexdata.com%2Fsolr%2Fselect%5D=solr-pz2.xsl&pz%3Acclmap%3Aterm%5Bocs-test.indexdata.com%2Fsolr%2Fselect%5D=1%3Dtext+s%3Dal&pz%3Acclmap%3Aisbn%5Bocs-test.indexdata.com%2Fsolr%2Fselect%5D=1%3Disbn&pz%3Aqueryencoding%5Bocs-test.indexdata.com%2Fsolr%2Fselect%5D=UTF-8
 http://localhost:9763/search.pz2?session=1&command=search&query=water
-1 http://localhost:9763/search.pz2?session=1&command=show&block=preferred
+2 http://localhost:9763/search.pz2?session=1&command=show&block=preferred
 http://localhost:9763/search.pz2?session=1&command=termlist&name=xtargets%2Csubject%2Cauthor%2Cdate%2Cmedium
index 406581f..6f89f6f 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<show>
-<status>OK</status>
+<show><status>OK</status>
 <activeclients>0</activeclients>
 <merged>97</merged>
 <total>1995</total>
@@ -17,7 +16,7 @@
 <md-author>De Villiers, Marq</md-author>
 <md-medium>book</md-medium></location>
 <relevance>23233</relevance>
-<recid>title water author de villiers marq medium book</recid>
+<recid>content: title water author de villiers marq medium book</recid>
 </hit>
 <hit>
 
@@ -36,7 +35,7 @@
 <md-medium>book</md-medium></location>
 <count>2</count>
 <relevance>21645</relevance>
-<recid>title potable water and methods of detecting impurities author baker m n medium book</recid>
+<recid>content: title potable water and methods of detecting impurities author baker m n medium book</recid>
 </hit>
 <hit>
 
@@ -51,7 +50,7 @@
 <md-description>&quot;Balochistan conservation strategy background paper&quot;--T.p</md-description>
 <md-medium>book</md-medium></location>
 <relevance>20202</relevance>
-<recid>title water author majeed abdul medium book</recid>
+<recid>content: title water author majeed abdul medium book</recid>
 </hit>
 <hit>
 
@@ -67,7 +66,7 @@
 <md-description>Examines major environmental issues surrounding water, giving examples of attempts to solve global problems and sources for more information</md-description>
 <md-medium>book</md-medium></location>
 <relevance>18501</relevance>
-<recid>title water author grant pamela medium book</recid>
+<recid>content: title water author grant pamela medium book</recid>
 </hit>
 <hit>
 
@@ -82,7 +81,7 @@
 <md-description>Includes index</md-description>
 <md-medium>book</md-medium></location>
 <relevance>18182</relevance>
-<recid>title water law author fisher d e medium book</recid>
+<recid>content: title water law author fisher d e medium book</recid>
 </hit>
 <hit>
 
@@ -98,7 +97,7 @@
 <md-description>Includes index</md-description>
 <md-medium>book</md-medium></location>
 <relevance>17576</relevance>
-<recid>title a primer on fresh water medium book</recid>
+<recid>content: title a primer on fresh water medium book</recid>
 </hit>
 <hit>
 
 <md-author>Thresh, John Clough</md-author>
 <md-medium>book</md-medium></location>
 <relevance>15152</relevance>
-<recid>title water and water supplies author thresh john clough medium book</recid>
+<recid>content: title water and water supplies author thresh john clough medium book</recid>
 </hit>
 <hit>
 
 <md-medium>book</md-medium></location>
 <count>2</count>
 <relevance>15152</relevance>
-<recid>title water quality assessment of the state water project medium book</recid>
+<recid>content: title water quality assessment of the state water project medium book</recid>
 </hit>
 <hit>
 
 <md-author>Mason, William Pitt</md-author>
 <md-medium>book</md-medium></location>
 <relevance>15152</relevance>
-<recid>title water supply author mason william pitt medium book</recid>
+<recid>content: title water supply author mason william pitt medium book</recid>
 </hit>
 <hit>
 
 <md-author>Farnham, Henry P</md-author>
 <md-medium>book</md-medium></location>
 <relevance>14630</relevance>
-<recid>title the law of waters and water rights author farnham henry p medium book</recid>
+<recid>content: title the law of waters and water rights author farnham henry p medium book</recid>
 </hit>
 <hit>
 
 <md-medium>book</md-medium></location>
 <count>2</count>
 <relevance>13675</relevance>
-<recid>title water in press medium book</recid>
+<recid>content: title water in press medium book</recid>
 </hit>
 <hit>
 
 <md-description>&quot;EPA Contract 68-C7-0011, work assignment 0-38.&quot;</md-description>
 <md-medium>book</md-medium></location>
 <relevance>13636</relevance>
-<recid>title regulations on the disposal of arsenic residuals from drinking water treatment plants medium book</recid>
+<recid>content: title regulations on the disposal of arsenic residuals from drinking water treatment plants medium book</recid>
 </hit>
 <hit>
 
 <md-description>&quot;A joint publication of Legislative Environmental Policy Office, Environmental Quality Council [and] Montana University System, Water Center&quot;</md-description>
 <md-medium>book</md-medium></location>
 <relevance>13199</relevance>
-<recid>title a guide to montana water quality regulation author bryan michelle medium book</recid>
+<recid>content: title a guide to montana water quality regulation author bryan michelle medium book</recid>
 </hit>
 <hit>
 
 <md-description>Collection of articles with reference to India</md-description>
 <md-medium>book</md-medium></location>
 <relevance>13131</relevance>
-<recid>title water technology management medium book</recid>
+<recid>content: title water technology management medium book</recid>
 </hit>
 <hit>
 
 <md-date>2000</md-date>
 <md-medium>book</md-medium></location>
 <relevance>13054</relevance>
-<recid>title methods of analysis by the u s geological survey national water quality laboratory medium book</recid>
+<recid>content: title methods of analysis by the u s geological survey national water quality laboratory medium book</recid>
 </hit>
 <hit>
 
 <md-description>&quot;This document was developed for US Environmental Protection Agency, Region 10, Seattle Washington, with the Idaho Water Resources Institute, University of Idaho.&quot;</md-description>
 <md-medium>book</md-medium></location>
 <relevance>13016</relevance>
-<recid>title aquatic habitat indicators and their application to water quality objectives within the clean water act author bauer steve medium book</recid>
+<recid>content: title aquatic habitat indicators and their application to water quality objectives within the clean water act author bauer steve medium book</recid>
 </hit>
 <hit>
 
 <md-description>&quot;March 1997.&quot;</md-description>
 <md-medium>book</md-medium></location>
 <relevance>12929</relevance>
-<recid>title an empirical analysis of water temperature and dissolved oxygen conditions in the red deer river author saffran karen anita medium book</recid>
+<recid>content: title an empirical analysis of water temperature and dissolved oxygen conditions in the red deer river author saffran karen anita medium book</recid>
 </hit>
 <hit>
 
 <md-description>&quot;GI-252&quot;--Cover</md-description>
 <md-medium>book</md-medium></location>
 <relevance>12626</relevance>
-<recid>title surface water quality monitoring procedures manual medium book</recid>
+<recid>content: title surface water quality monitoring procedures manual medium book</recid>
 </hit>
 <hit>
 
 <md-date>1997</md-date>
 <md-medium>book</md-medium></location>
 <relevance>12323</relevance>
-<recid>title international conference on management of drinking water resources chennai december medium book</recid>
+<recid>content: title international conference on management of drinking water resources chennai december medium book</recid>
 </hit>
 <hit>
 
 <md-date>1998</md-date>
 <md-medium>book</md-medium></location>
 <relevance>12121</relevance>
-<recid>title mercados e instituciones de aguas en bolivia medium book</recid>
+<recid>content: title mercados e instituciones de aguas en bolivia medium book</recid>
 </hit>
-</show>
+</show>
\ No newline at end of file
index dd89fec..9d5251c 100644 (file)
@@ -1,5 +1,5 @@
-<termlist>
-<activeclients>0</activeclients>
+<?xml version="1.0" encoding="UTF-8"?>
+<termlist><activeclients>0</activeclients>
 <list name="xtargets">
 <term>
 <id>ocs-test.indexdata.com/solr/select</id>
@@ -64,4 +64,4 @@
 <term><name>book</name><frequency>99</frequency></term>
 <term><name>book (electronic)</name><frequency>1</frequency></term>
 </list>
-</termlist>
+</termlist>
\ No newline at end of file
index 3ed2d80..7a97754 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<show>
-<status>OK</status>
+<show><status>OK</status>
 <activeclients>0</activeclients>
 <merged>3</merged>
 <total>3</total>
@@ -20,7 +19,7 @@ under development to replace the printed Bibliography of Marine Geology</md-desc
 <md-test-usersetting-2>test-usersetting-2 data: 
 </md-test-usersetting-2></location>
 <relevance>9416</relevance>
-<recid>title bibliography of maine geology author medium book</recid>
+<recid>content: title bibliography of maine geology author medium book</recid>
 </hit>
 <hit>
 
@@ -40,7 +39,7 @@ restricted to Southern Maine</md-description>
 <md-test-usersetting-2>test-usersetting-2 data: 
 </md-test-usersetting-2></location>
 <relevance>0</relevance>
-<recid>title groundwater resource maps county series author medium book</recid>
+<recid>content: title groundwater resource maps county series author medium book</recid>
 </hit>
 <hit>
 
@@ -56,6 +55,6 @@ operator, driller, location, depth, copies of logs run, permits, samples
 <md-test-usersetting-2>test-usersetting-2 data: 
 </md-test-usersetting-2></location>
 <relevance>0</relevance>
-<recid>title oil gas drilling author medium book</recid>
+<recid>content: title oil gas drilling author medium book</recid>
 </hit>
-</show>
+</show>
\ No newline at end of file
index 5c85987..d1e8a82 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<show>
-<status>OK</status>
+<show><status>OK</status>
 <activeclients>0</activeclients>
 <merged>3</merged>
 <total>3</total>
@@ -13,7 +12,7 @@
 <md-title>BIBLIOGRAPHY OF MAINE GEOLOGY</md-title>
 <md-description>This data base is a computer based bibliography of marine geology.  It allows searching by topic and geographic location, similar to GEOREF.  It is currently under development to replace the printed Bibliography of Marine Geology</md-description></location>
 <relevance>9416</relevance>
-<recid>title bibliography of maine geology</recid>
+<recid>content: title bibliography of maine geology</recid>
 </hit>
 <hit>
 
@@ -22,7 +21,7 @@
 <md-title>GROUNDWATER RESOURCE MAPS - COUNTY SERIES</md-title>
 <md-description>A series of 1:250,000 scale maps showing well yield, well depth, and depth to bedrock for a large number of bedrock wells inventoried by the Maine Geological Survey in the mid-to late 1970&apos;s comprises this data set.  Some series also show bedrock topography and potentiometric surface.  Geographic coverage is restricted to Southern Maine</md-description></location>
 <relevance>0</relevance>
-<recid>title groundwater resource maps county series</recid>
+<recid>content: title groundwater resource maps county series</recid>
 </hit>
 <hit>
 
@@ -31,6 +30,6 @@
 <md-title>OIL/GAS DRILLING</md-title>
 <md-description>This database contains information on oil and gas drilling such as well name, operator, driller, location, depth, copies of logs run, permits, samples (cuttings, core), completion records</md-description></location>
 <relevance>0</relevance>
-<recid>title oil gas drilling</recid>
+<recid>content: title oil gas drilling</recid>
 </hit>
-</show>
+</show>
\ No newline at end of file
diff --git a/test/test_url.cfg b/test/test_url.cfg
new file mode 100644 (file)
index 0000000..881ee65
--- /dev/null
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<pazpar2 xmlns="http://www.indexdata.com/pazpar2/1.0">
+  <!-- Used by test_url.sh -->
+  <threads number="0"/> <!-- non-zero to enable threaded operation -->
+  <server>
+    <listen port="9763"/>
+    
+    <service>
+      <icu_chain id="relevance" locale="en">
+       <transform rule="[:Control:] Any-Remove"/>
+       <tokenize rule="l"/>
+       <transform rule="[[:WhiteSpace:][:Punctuation:]`] Remove"/>
+       <casemap rule="l"/>
+      </icu_chain>
+      
+      <icu_chain id="sort" locale="en">
+       <transform rule="[[:Control:][:WhiteSpace:][:Punctuation:]`] Remove"/>
+       <casemap rule="l"/>
+      </icu_chain>
+      
+      <icu_chain id="mergekey" locale="en">
+       <tokenize rule="l"/>
+       <transform rule="[[:Control:][:WhiteSpace:][:Punctuation:]`] Remove"/>
+       <casemap rule="l"/>
+      </icu_chain>
+      
+      <icu_chain id="facet" locale="en">
+       <display/>
+       <transform rule="Title"/>
+      </icu_chain>
+      
+      <metadata name="url" merge="unique"/>
+      <metadata name="title" brief="yes" sortkey="skiparticle" merge="longest" rank="6" mergekey="required" />
+      <metadata name="title-remainder" brief="yes" merge="longest" rank="5"/>
+      <metadata name="isbn"/>
+      <metadata name="date" brief="yes" sortkey="numeric" type="year" merge="range"
+                termlist="yes"/>
+      <metadata name="author" brief="yes" termlist="yes" merge="longest" rank="2" mergekey="optional" />
+      <metadata name="subject" merge="unique" termlist="yes" rank="3"/>
+      <metadata name="id"/>
+      <metadata name="lccn" merge="unique"/>
+      <metadata name="description" brief="yes" merge="longest" rank="3"/>
+    </service>
+    
+  </server>
+  
+</pazpar2>
+<!-- Keep this comment at the end of the file
+     Local variables:
+     mode: nxml
+     End:
+-->
+
diff --git a/test/test_url.sh b/test/test_url.sh
new file mode 100755 (executable)
index 0000000..dd6b88f
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh
+#
+
+# srcdir might be set by make
+srcdir=${srcdir:-"."}
+
+# Test using test_http.cfg
+exec ${srcdir}/run_pazpar2.sh test_url
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation: 2
+# sh-basic-offset: 4
+# End:
diff --git a/test/test_url.urls b/test/test_url.urls
new file mode 100644 (file)
index 0000000..d93248f
--- /dev/null
@@ -0,0 +1,10 @@
+http://localhost:9763/search.pz2?command=init&clear=1&pz:elements%5Bmy%5D=F&pz:requestsyntax%5Bmy%5D=usmarc&pz:nativesyntax%5Bmy%5D=iso2709&pz:xslt%5Bmy%5D=marc21_test.xsl&pz:name%5Bmy%5D=marcserver&pz:url%5Bmy%5D=z3950.indexdata.com%2Fmarc
+http://localhost:9763/search.pz2?session=1&command=search&query=computer
+2 http://localhost:9763/search.pz2?session=1&command=show&block=1
+http://localhost:9763/search.pz2?session=1&command=settings&pz:url%5Bmy%5D=z3950.indexdata.com%2Fgils&pz:sortmap:title%5Bmy%5D=type7:title
+http://localhost:9763/search.pz2?session=1&command=search&query=the&maxrecs=3
+2 http://localhost:9763/search.pz2?session=1&command=show&block=1
+2 http://localhost:9763/search.pz2?session=1&command=show&block=1&sort=title:1
+2 http://localhost:9763/search.pz2?session=1&command=show&block=1&sort=title:1
+2 http://localhost:9763/search.pz2?session=1&command=show&block=1&sort=title:0
+2 http://localhost:9763/search.pz2?session=1&command=show&block=1&sort=title:0
diff --git a/test/test_url_1.res b/test/test_url_1.res
new file mode 100644 (file)
index 0000000..81ff9ff
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<init><status>OK</status><session>1</session><protocol>1</protocol></init>
\ No newline at end of file
diff --git a/test/test_url_10.res b/test/test_url_10.res
new file mode 100644 (file)
index 0000000..57aba5a
--- /dev/null
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<show><status>OK</status>
+<activeclients>0</activeclients>
+<merged>7</merged>
+<total>31</total>
+<start>0</start>
+<num>7</num>
+<hit>
+
+<md-title>WATER WELL DATA</md-title>
+<md-description>This database contains the following information on water wells in Nevada: driller&apos;s name, owner&apos;s name, location, formations encountered, lithologic descriptions, water level, and water quality</md-description><location id="my" name="marcserver">
+<md-title>WATER WELL DATA</md-title>
+<md-description tag="520">This database contains the following information on water wells in Nevada: driller&apos;s name, owner&apos;s name, location, formations encountered, lithologic descriptions, water level, and water quality</md-description>
+<md-description tag="513">1930-PRESENT</md-description></location>
+<recid>content: title water well data author medium book</recid>
+</hit>
+<hit>
+
+<md-title>UTAH GEOLOGIC MAP BIBLIOGRAPHY</md-title>
+<md-description>This collection consists of theses, dissertations, and other unpublished maps as well as published maps of the geology of Utah.  Some maps of the collection are xeroxed from limited collections.  Cross-sections are included in set.  Data file consists of map bibliography</md-description><location id="my" name="marcserver">
+<md-title>UTAH GEOLOGIC MAP BIBLIOGRAPHY</md-title>
+<md-description tag="520">This collection consists of theses, dissertations, and other unpublished maps as well as published maps of the geology of Utah.  Some maps of the collection are xeroxed from limited collections.  Cross-sections are included in set.  Data file consists of map bibliography</md-description>
+<md-description tag="513">-PRESENT</md-description></location>
+<recid>content: title utah geologic map bibliography author medium book</recid>
+</hit>
+<hit>
+
+<md-title>UTAH GEOLOGICAL AND MINERAL SURVEY PUBLICATIONS</md-title>
+<md-description>Publications of the Utah Geological and Mineral Survey include reports of investigation, special studies, bulletins, open-file reports, geologic map of Utah, publications of geological societies, geologic and oil and mineral maps, coal monographs, circulars, water resource bulletins, and reprints of articles</md-description><location id="my" name="marcserver">
+<md-title>UTAH GEOLOGICAL AND MINERAL SURVEY PUBLICATIONS</md-title>
+<md-description tag="520">Publications of the Utah Geological and Mineral Survey include reports of investigation, special studies, bulletins, open-file reports, geologic map of Utah, publications of geological societies, geologic and oil and mineral maps, coal monographs, circulars, water resource bulletins, and reprints of articles</md-description>
+<md-description tag="513">-PRESENT</md-description></location>
+<recid>content: title utah geological and mineral survey publications author medium book</recid>
+</hit>
+<hit>
+
+<md-title>UTAH EARTHQUAKE EPICENTERS</md-title>
+<md-description>Five files of epicenter data arranged by date comprise this data set.  These files are searchable by magnitude and longitude/latitude.  Hardcopy of listing and plot of requested area available.  Epicenter location and date, magnitude, and focal depth available</md-description><location id="my" name="marcserver">
+<md-title>UTAH EARTHQUAKE EPICENTERS</md-title>
+<md-description tag="520">Five files of epicenter data arranged by date comprise this data set.  These files are searchable by magnitude and longitude/latitude.  Hardcopy of listing and plot of requested area available.  Epicenter location and date, magnitude, and focal depth available</md-description>
+<md-description tag="513">-PRESENT</md-description></location>
+<recid>content: title utah earthquake epicenters author medium book</recid>
+</hit>
+<hit>
+
+<md-title>BIBLIOGRAPHY OF MAINE GEOLOGY</md-title>
+<md-description>This data base is a computer based bibliography of marine geology.  It allows searching by topic and geographic location, similar to GEOREF.  It is currently under development to replace the printed Bibliography of Marine Geology</md-description><location id="my" name="marcserver">
+<md-title>BIBLIOGRAPHY OF MAINE GEOLOGY</md-title>
+<md-description tag="520">This data base is a computer based bibliography of marine geology.  It allows searching by topic and geographic location, similar to GEOREF.  It is currently under development to replace the printed Bibliography of Marine Geology</md-description>
+<md-description tag="513">1692-PRESENT</md-description></location>
+<recid>content: title bibliography of maine geology author medium book</recid>
+</hit>
+<hit>
+
+<md-title>AUTOMATED FLOOD WARNING NETWORK</md-title>
+<md-description>The new system will collect rainfall, temperature, soil moisture, wind speed and direction, humidity, and streamflow (above certain values)</md-description><location id="my" name="marcserver">
+<md-title>AUTOMATED FLOOD WARNING NETWORK</md-title>
+<md-description tag="520">The new system will collect rainfall, temperature, soil moisture, wind speed and direction, humidity, and streamflow (above certain values)</md-description>
+<md-description tag="513">1982-PRESENT</md-description></location>
+<recid>content: title automated flood warning network author medium book</recid>
+</hit>
+<hit>
+
+<md-title>APPLIED GEOLOGY FILE</md-title>
+<md-description>Reports and memorandums completed by the Site Investigation Section comprise this data set.  Subjects include geotechnical appraisal of public facility sites before and during construction and evaluations of hazardous waste problems</md-description><location id="my" name="marcserver">
+<md-title>APPLIED GEOLOGY FILE</md-title>
+<md-description tag="520">Reports and memorandums completed by the Site Investigation Section comprise this data set.  Subjects include geotechnical appraisal of public facility sites before and during construction and evaluations of hazardous waste problems</md-description>
+<md-description tag="513">1970-PRESENT</md-description></location>
+<recid>content: title applied geology file author medium book</recid>
+</hit>
+</show>
\ No newline at end of file
diff --git a/test/test_url_2.res b/test/test_url_2.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_url_3.res b/test/test_url_3.res
new file mode 100644 (file)
index 0000000..6ac87ef
--- /dev/null
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<show><status>OK</status>
+<activeclients>0</activeclients>
+<merged>9</merged>
+<total>10</total>
+<start>0</start>
+<num>9</num>
+<hit>
+
+<md-title>How to program a computer</md-title>
+<md-author>Jack Collins</md-author><location id="my" name="marcserver">
+<md-title>How to program a computer</md-title>
+<md-author>Jack Collins</md-author></location>
+<location id="my" name="marcserver">
+<md-title>How to program a computer</md-title>
+<md-author>Jack Collins</md-author></location>
+<count>2</count>
+<relevance>25286</relevance>
+<recid>content: title how to program a computer author jack collins medium book</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="my" name="marcserver">
+<md-title>The Computer Bible</md-title>
+<md-date>1973-1980</md-date>
+<md-description tag="500">Hebrew and Greek; introductions in English</md-description>
+<md-description tag="500">Vols. 2, 8: Missoula, Mont. : Published by Scholars Press for Biblical Research Associates</md-description></location>
+<relevance>21072</relevance>
+<recid>content: title the computer bible author medium book</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="my" name="marcserver">
+<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>15804</relevance>
+<recid>content: title computer science technology author medium book</recid>
+</hit>
+<hit>
+
+<md-title>A plan for community college computer development</md-title>
+<md-date>1971</md-date>
+<md-description>Cover title</md-description><location id="my" name="marcserver">
+<md-title>A plan for community college computer development</md-title>
+<md-date>1971</md-date>
+<md-description tag="500">Cover title</md-description></location>
+<relevance>9030</relevance>
+<recid>content: title a plan for community college computer development author medium book</recid>
+</hit>
+<hit>
+
+<md-title>Washington metropolitan area rail computer feasibility study;</md-title>
+<md-title-remainder>final report</md-title-remainder>
+<md-date>1971</md-date>
+<md-author>Englund, Carl R</md-author>
+<md-description>&quot;Contract DOT-UT-10003.&quot;</md-description><location id="my" name="marcserver">
+<md-title>Washington metropolitan area rail computer feasibility study;</md-title>
+<md-title-remainder>final report</md-title-remainder>
+<md-date>1971</md-date>
+<md-author>Englund, Carl R</md-author>
+<md-description tag="500">&quot;Contract DOT-UT-10003.&quot;</md-description></location>
+<relevance>9030</relevance>
+<recid>content: title washington metropolitan area rail computer feasibility study author englund carl r medium book</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="my" name="marcserver">
+<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 tag="500">Scale of maps ca. 1:1,000,000</md-description>
+<md-description tag="504">Bibliography: p. 4</md-description></location>
+<relevance>8780</relevance>
+<recid>content: title the puget sound region author mairs john w medium book</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>
+<md-description>Includes bibliographical references and index</md-description><location id="my" name="marcserver">
+<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>
+<md-description tag="504">Includes bibliographical references and index</md-description></location>
+<relevance>6321</relevance>
+<recid>content: title computer processing of dynamic images from an anger scintillation camera author medium book</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="my" name="marcserver">
+<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>6321</relevance>
+<recid>content: title the use of passwords for controlled access to computer resources author wood helen m medium book</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>
+<md-description>Includes bibliographical references and index</md-description><location id="my" name="marcserver">
+<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>
+<md-description tag="504">Includes bibliographical references and index</md-description></location>
+<relevance>0</relevance>
+<recid>content: title reconstruction tomography in diagnostic radiology and nuclear medicine author medium book</recid>
+</hit>
+</show>
\ No newline at end of file
diff --git a/test/test_url_4.res b/test/test_url_4.res
new file mode 100644 (file)
index 0000000..42534e3
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<settings><status>OK</status></settings>
\ No newline at end of file
diff --git a/test/test_url_5.res b/test/test_url_5.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_url_6.res b/test/test_url_6.res
new file mode 100644 (file)
index 0000000..e0de11a
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<show><status>OK</status>
+<activeclients>0</activeclients>
+<merged>3</merged>
+<total>31</total>
+<start>0</start>
+<num>3</num>
+<hit>
+
+<md-title>APPLIED GEOLOGY FILE</md-title>
+<md-description>Reports and memorandums completed by the Site Investigation Section comprise this data set.  Subjects include geotechnical appraisal of public facility sites before and during construction and evaluations of hazardous waste problems</md-description><location id="my" name="marcserver">
+<md-title>APPLIED GEOLOGY FILE</md-title>
+<md-description tag="520">Reports and memorandums completed by the Site Investigation Section comprise this data set.  Subjects include geotechnical appraisal of public facility sites before and during construction and evaluations of hazardous waste problems</md-description>
+<md-description tag="513">1970-PRESENT</md-description></location>
+<relevance>3923</relevance>
+<recid>content: title applied geology file author medium book</recid>
+</hit>
+<hit>
+
+<md-title>UTAH GEOLOGICAL AND MINERAL SURVEY PUBLICATIONS</md-title>
+<md-description>Publications of the Utah Geological and Mineral Survey include reports of investigation, special studies, bulletins, open-file reports, geologic map of Utah, publications of geological societies, geologic and oil and mineral maps, coal monographs, circulars, water resource bulletins, and reprints of articles</md-description><location id="my" name="marcserver">
+<md-title>UTAH GEOLOGICAL AND MINERAL SURVEY PUBLICATIONS</md-title>
+<md-description tag="520">Publications of the Utah Geological and Mineral Survey include reports of investigation, special studies, bulletins, open-file reports, geologic map of Utah, publications of geological societies, geologic and oil and mineral maps, coal monographs, circulars, water resource bulletins, and reprints of articles</md-description>
+<md-description tag="513">-PRESENT</md-description></location>
+<relevance>2896</relevance>
+<recid>content: title utah geological and mineral survey publications author medium book</recid>
+</hit>
+<hit>
+
+<md-title>UTAH EARTHQUAKE EPICENTERS</md-title>
+<md-description>Five files of epicenter data arranged by date comprise this data set.  These files are searchable by magnitude and longitude/latitude.  Hardcopy of listing and plot of requested area available.  Epicenter location and date, magnitude, and focal depth available</md-description><location id="my" name="marcserver">
+<md-title>UTAH EARTHQUAKE EPICENTERS</md-title>
+<md-description tag="520">Five files of epicenter data arranged by date comprise this data set.  These files are searchable by magnitude and longitude/latitude.  Hardcopy of listing and plot of requested area available.  Epicenter location and date, magnitude, and focal depth available</md-description>
+<md-description tag="513">-PRESENT</md-description></location>
+<relevance>0</relevance>
+<recid>content: title utah earthquake epicenters author medium book</recid>
+</hit>
+</show>
\ No newline at end of file
diff --git a/test/test_url_7.res b/test/test_url_7.res
new file mode 100644 (file)
index 0000000..ef31ae5
--- /dev/null
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<show><status>OK</status>
+<activeclients>0</activeclients>
+<merged>5</merged>
+<total>31</total>
+<start>0</start>
+<num>5</num>
+<hit>
+
+<md-title>APPLIED GEOLOGY FILE</md-title>
+<md-description>Reports and memorandums completed by the Site Investigation Section comprise this data set.  Subjects include geotechnical appraisal of public facility sites before and during construction and evaluations of hazardous waste problems</md-description><location id="my" name="marcserver">
+<md-title>APPLIED GEOLOGY FILE</md-title>
+<md-description tag="520">Reports and memorandums completed by the Site Investigation Section comprise this data set.  Subjects include geotechnical appraisal of public facility sites before and during construction and evaluations of hazardous waste problems</md-description>
+<md-description tag="513">1970-PRESENT</md-description></location>
+<recid>content: title applied geology file author medium book</recid>
+</hit>
+<hit>
+
+<md-title>AUTOMATED FLOOD WARNING NETWORK</md-title>
+<md-description>The new system will collect rainfall, temperature, soil moisture, wind speed and direction, humidity, and streamflow (above certain values)</md-description><location id="my" name="marcserver">
+<md-title>AUTOMATED FLOOD WARNING NETWORK</md-title>
+<md-description tag="520">The new system will collect rainfall, temperature, soil moisture, wind speed and direction, humidity, and streamflow (above certain values)</md-description>
+<md-description tag="513">1982-PRESENT</md-description></location>
+<recid>content: title automated flood warning network author medium book</recid>
+</hit>
+<hit>
+
+<md-title>BIBLIOGRAPHY OF MAINE GEOLOGY</md-title>
+<md-description>This data base is a computer based bibliography of marine geology.  It allows searching by topic and geographic location, similar to GEOREF.  It is currently under development to replace the printed Bibliography of Marine Geology</md-description><location id="my" name="marcserver">
+<md-title>BIBLIOGRAPHY OF MAINE GEOLOGY</md-title>
+<md-description tag="520">This data base is a computer based bibliography of marine geology.  It allows searching by topic and geographic location, similar to GEOREF.  It is currently under development to replace the printed Bibliography of Marine Geology</md-description>
+<md-description tag="513">1692-PRESENT</md-description></location>
+<recid>content: title bibliography of maine geology author medium book</recid>
+</hit>
+<hit>
+
+<md-title>UTAH EARTHQUAKE EPICENTERS</md-title>
+<md-description>Five files of epicenter data arranged by date comprise this data set.  These files are searchable by magnitude and longitude/latitude.  Hardcopy of listing and plot of requested area available.  Epicenter location and date, magnitude, and focal depth available</md-description><location id="my" name="marcserver">
+<md-title>UTAH EARTHQUAKE EPICENTERS</md-title>
+<md-description tag="520">Five files of epicenter data arranged by date comprise this data set.  These files are searchable by magnitude and longitude/latitude.  Hardcopy of listing and plot of requested area available.  Epicenter location and date, magnitude, and focal depth available</md-description>
+<md-description tag="513">-PRESENT</md-description></location>
+<recid>content: title utah earthquake epicenters author medium book</recid>
+</hit>
+<hit>
+
+<md-title>UTAH GEOLOGICAL AND MINERAL SURVEY PUBLICATIONS</md-title>
+<md-description>Publications of the Utah Geological and Mineral Survey include reports of investigation, special studies, bulletins, open-file reports, geologic map of Utah, publications of geological societies, geologic and oil and mineral maps, coal monographs, circulars, water resource bulletins, and reprints of articles</md-description><location id="my" name="marcserver">
+<md-title>UTAH GEOLOGICAL AND MINERAL SURVEY PUBLICATIONS</md-title>
+<md-description tag="520">Publications of the Utah Geological and Mineral Survey include reports of investigation, special studies, bulletins, open-file reports, geologic map of Utah, publications of geological societies, geologic and oil and mineral maps, coal monographs, circulars, water resource bulletins, and reprints of articles</md-description>
+<md-description tag="513">-PRESENT</md-description></location>
+<recid>content: title utah geological and mineral survey publications author medium book</recid>
+</hit>
+</show>
\ No newline at end of file
diff --git a/test/test_url_8.res b/test/test_url_8.res
new file mode 100644 (file)
index 0000000..ef31ae5
--- /dev/null
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<show><status>OK</status>
+<activeclients>0</activeclients>
+<merged>5</merged>
+<total>31</total>
+<start>0</start>
+<num>5</num>
+<hit>
+
+<md-title>APPLIED GEOLOGY FILE</md-title>
+<md-description>Reports and memorandums completed by the Site Investigation Section comprise this data set.  Subjects include geotechnical appraisal of public facility sites before and during construction and evaluations of hazardous waste problems</md-description><location id="my" name="marcserver">
+<md-title>APPLIED GEOLOGY FILE</md-title>
+<md-description tag="520">Reports and memorandums completed by the Site Investigation Section comprise this data set.  Subjects include geotechnical appraisal of public facility sites before and during construction and evaluations of hazardous waste problems</md-description>
+<md-description tag="513">1970-PRESENT</md-description></location>
+<recid>content: title applied geology file author medium book</recid>
+</hit>
+<hit>
+
+<md-title>AUTOMATED FLOOD WARNING NETWORK</md-title>
+<md-description>The new system will collect rainfall, temperature, soil moisture, wind speed and direction, humidity, and streamflow (above certain values)</md-description><location id="my" name="marcserver">
+<md-title>AUTOMATED FLOOD WARNING NETWORK</md-title>
+<md-description tag="520">The new system will collect rainfall, temperature, soil moisture, wind speed and direction, humidity, and streamflow (above certain values)</md-description>
+<md-description tag="513">1982-PRESENT</md-description></location>
+<recid>content: title automated flood warning network author medium book</recid>
+</hit>
+<hit>
+
+<md-title>BIBLIOGRAPHY OF MAINE GEOLOGY</md-title>
+<md-description>This data base is a computer based bibliography of marine geology.  It allows searching by topic and geographic location, similar to GEOREF.  It is currently under development to replace the printed Bibliography of Marine Geology</md-description><location id="my" name="marcserver">
+<md-title>BIBLIOGRAPHY OF MAINE GEOLOGY</md-title>
+<md-description tag="520">This data base is a computer based bibliography of marine geology.  It allows searching by topic and geographic location, similar to GEOREF.  It is currently under development to replace the printed Bibliography of Marine Geology</md-description>
+<md-description tag="513">1692-PRESENT</md-description></location>
+<recid>content: title bibliography of maine geology author medium book</recid>
+</hit>
+<hit>
+
+<md-title>UTAH EARTHQUAKE EPICENTERS</md-title>
+<md-description>Five files of epicenter data arranged by date comprise this data set.  These files are searchable by magnitude and longitude/latitude.  Hardcopy of listing and plot of requested area available.  Epicenter location and date, magnitude, and focal depth available</md-description><location id="my" name="marcserver">
+<md-title>UTAH EARTHQUAKE EPICENTERS</md-title>
+<md-description tag="520">Five files of epicenter data arranged by date comprise this data set.  These files are searchable by magnitude and longitude/latitude.  Hardcopy of listing and plot of requested area available.  Epicenter location and date, magnitude, and focal depth available</md-description>
+<md-description tag="513">-PRESENT</md-description></location>
+<recid>content: title utah earthquake epicenters author medium book</recid>
+</hit>
+<hit>
+
+<md-title>UTAH GEOLOGICAL AND MINERAL SURVEY PUBLICATIONS</md-title>
+<md-description>Publications of the Utah Geological and Mineral Survey include reports of investigation, special studies, bulletins, open-file reports, geologic map of Utah, publications of geological societies, geologic and oil and mineral maps, coal monographs, circulars, water resource bulletins, and reprints of articles</md-description><location id="my" name="marcserver">
+<md-title>UTAH GEOLOGICAL AND MINERAL SURVEY PUBLICATIONS</md-title>
+<md-description tag="520">Publications of the Utah Geological and Mineral Survey include reports of investigation, special studies, bulletins, open-file reports, geologic map of Utah, publications of geological societies, geologic and oil and mineral maps, coal monographs, circulars, water resource bulletins, and reprints of articles</md-description>
+<md-description tag="513">-PRESENT</md-description></location>
+<recid>content: title utah geological and mineral survey publications author medium book</recid>
+</hit>
+</show>
\ No newline at end of file
diff --git a/test/test_url_9.res b/test/test_url_9.res
new file mode 100644 (file)
index 0000000..57aba5a
--- /dev/null
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<show><status>OK</status>
+<activeclients>0</activeclients>
+<merged>7</merged>
+<total>31</total>
+<start>0</start>
+<num>7</num>
+<hit>
+
+<md-title>WATER WELL DATA</md-title>
+<md-description>This database contains the following information on water wells in Nevada: driller&apos;s name, owner&apos;s name, location, formations encountered, lithologic descriptions, water level, and water quality</md-description><location id="my" name="marcserver">
+<md-title>WATER WELL DATA</md-title>
+<md-description tag="520">This database contains the following information on water wells in Nevada: driller&apos;s name, owner&apos;s name, location, formations encountered, lithologic descriptions, water level, and water quality</md-description>
+<md-description tag="513">1930-PRESENT</md-description></location>
+<recid>content: title water well data author medium book</recid>
+</hit>
+<hit>
+
+<md-title>UTAH GEOLOGIC MAP BIBLIOGRAPHY</md-title>
+<md-description>This collection consists of theses, dissertations, and other unpublished maps as well as published maps of the geology of Utah.  Some maps of the collection are xeroxed from limited collections.  Cross-sections are included in set.  Data file consists of map bibliography</md-description><location id="my" name="marcserver">
+<md-title>UTAH GEOLOGIC MAP BIBLIOGRAPHY</md-title>
+<md-description tag="520">This collection consists of theses, dissertations, and other unpublished maps as well as published maps of the geology of Utah.  Some maps of the collection are xeroxed from limited collections.  Cross-sections are included in set.  Data file consists of map bibliography</md-description>
+<md-description tag="513">-PRESENT</md-description></location>
+<recid>content: title utah geologic map bibliography author medium book</recid>
+</hit>
+<hit>
+
+<md-title>UTAH GEOLOGICAL AND MINERAL SURVEY PUBLICATIONS</md-title>
+<md-description>Publications of the Utah Geological and Mineral Survey include reports of investigation, special studies, bulletins, open-file reports, geologic map of Utah, publications of geological societies, geologic and oil and mineral maps, coal monographs, circulars, water resource bulletins, and reprints of articles</md-description><location id="my" name="marcserver">
+<md-title>UTAH GEOLOGICAL AND MINERAL SURVEY PUBLICATIONS</md-title>
+<md-description tag="520">Publications of the Utah Geological and Mineral Survey include reports of investigation, special studies, bulletins, open-file reports, geologic map of Utah, publications of geological societies, geologic and oil and mineral maps, coal monographs, circulars, water resource bulletins, and reprints of articles</md-description>
+<md-description tag="513">-PRESENT</md-description></location>
+<recid>content: title utah geological and mineral survey publications author medium book</recid>
+</hit>
+<hit>
+
+<md-title>UTAH EARTHQUAKE EPICENTERS</md-title>
+<md-description>Five files of epicenter data arranged by date comprise this data set.  These files are searchable by magnitude and longitude/latitude.  Hardcopy of listing and plot of requested area available.  Epicenter location and date, magnitude, and focal depth available</md-description><location id="my" name="marcserver">
+<md-title>UTAH EARTHQUAKE EPICENTERS</md-title>
+<md-description tag="520">Five files of epicenter data arranged by date comprise this data set.  These files are searchable by magnitude and longitude/latitude.  Hardcopy of listing and plot of requested area available.  Epicenter location and date, magnitude, and focal depth available</md-description>
+<md-description tag="513">-PRESENT</md-description></location>
+<recid>content: title utah earthquake epicenters author medium book</recid>
+</hit>
+<hit>
+
+<md-title>BIBLIOGRAPHY OF MAINE GEOLOGY</md-title>
+<md-description>This data base is a computer based bibliography of marine geology.  It allows searching by topic and geographic location, similar to GEOREF.  It is currently under development to replace the printed Bibliography of Marine Geology</md-description><location id="my" name="marcserver">
+<md-title>BIBLIOGRAPHY OF MAINE GEOLOGY</md-title>
+<md-description tag="520">This data base is a computer based bibliography of marine geology.  It allows searching by topic and geographic location, similar to GEOREF.  It is currently under development to replace the printed Bibliography of Marine Geology</md-description>
+<md-description tag="513">1692-PRESENT</md-description></location>
+<recid>content: title bibliography of maine geology author medium book</recid>
+</hit>
+<hit>
+
+<md-title>AUTOMATED FLOOD WARNING NETWORK</md-title>
+<md-description>The new system will collect rainfall, temperature, soil moisture, wind speed and direction, humidity, and streamflow (above certain values)</md-description><location id="my" name="marcserver">
+<md-title>AUTOMATED FLOOD WARNING NETWORK</md-title>
+<md-description tag="520">The new system will collect rainfall, temperature, soil moisture, wind speed and direction, humidity, and streamflow (above certain values)</md-description>
+<md-description tag="513">1982-PRESENT</md-description></location>
+<recid>content: title automated flood warning network author medium book</recid>
+</hit>
+<hit>
+
+<md-title>APPLIED GEOLOGY FILE</md-title>
+<md-description>Reports and memorandums completed by the Site Investigation Section comprise this data set.  Subjects include geotechnical appraisal of public facility sites before and during construction and evaluations of hazardous waste problems</md-description><location id="my" name="marcserver">
+<md-title>APPLIED GEOLOGY FILE</md-title>
+<md-description tag="520">Reports and memorandums completed by the Site Investigation Section comprise this data set.  Subjects include geotechnical appraisal of public facility sites before and during construction and evaluations of hazardous waste problems</md-description>
+<md-description tag="513">1970-PRESENT</md-description></location>
+<recid>content: title applied geology file author medium book</recid>
+</hit>
+</show>
\ No newline at end of file
index 22aa704..adf52b4 100644 (file)
@@ -191,7 +191,6 @@ PAZPAR2_OBJS = \
    "$(OBJDIR)\normalize7bit.obj" \
    "$(OBJDIR)\database.obj" \
    "$(OBJDIR)\settings.obj" \
-   "$(OBJDIR)\getaddrinfo.obj" \
    "$(OBJDIR)\charsets.obj" \
    "$(OBJDIR)\client.obj" \
    "$(OBJDIR)\jenkins_hash.obj" \