more info on DOM filter config
[idzebra-moved-to-github.git] / index / recgrs.c
index c8bebf9..5b0a783 100644 (file)
@@ -1,5 +1,5 @@
-/* $Id: recgrs.c,v 1.11 2006-11-30 11:03:57 adam Exp $
-   Copyright (C) 1995-2006
+/* $Id: recgrs.c,v 1.15 2007-02-02 12:16:38 adam Exp $
+   Copyright (C) 1995-2007
    Index Data ApS
 
 This file is part of the Zebra server.
@@ -27,6 +27,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 #include <yaz/log.h>
 #include <yaz/oid.h>
+#include <yaz/diagbib1.h>
 
 #include <d1_absyn.h>
 #include <idzebra/recgrs.h>
@@ -537,6 +538,7 @@ static void index_xpath(struct source_parser *sp, data1_node *n,
     int termlist_only = 1;
     data1_termlist *tl;
     int xpdone = 0;
+
     if (!n->root->u.root.absyn 
         || 
         n->root->u.root.absyn->xpath_indexing == DATA1_XPATH_INDEXING_ENABLE)
@@ -544,6 +546,7 @@ static void index_xpath(struct source_parser *sp, data1_node *n,
        termlist_only = 0;
     }
 
+
     switch (n->which)
     {
     case DATA1N_data:
@@ -584,7 +587,9 @@ static void index_xpath(struct source_parser *sp, data1_node *n,
                     fputc ('\n', stdout);
                 }
                 else
+                {
                     (*p->tokenAdd)(&wrd_tl);
+                }
                 if (wrd_tl.seqno > max_seqno)
                     max_seqno = wrd_tl.seqno;
            }
@@ -1110,7 +1115,7 @@ int zebra_grs_retrieve(void *clientData, struct recRetrieveCtrl *p,
     node = (*grs_read)(&gri);
     if (!node)
     {
-       p->diagnostic = 14;
+       p->diagnostic = YAZ_BIB1_SYSTEM_ERROR_IN_PRESENTING_RECORDS;
         nmem_destroy (mem);
        return 0;
     }
@@ -1186,7 +1191,7 @@ int zebra_grs_retrieve(void *clientData, struct recRetrieveCtrl *p,
                onode = node;
                if (!(node = data1_map_record(p->dh, onode, map, mem)))
                {
-                   p->diagnostic = 14;
+                   p->diagnostic = YAZ_BIB1_SYSTEM_ERROR_IN_PRESENTING_RECORDS;
                    nmem_destroy (mem);
                    return 0;
                }
@@ -1215,7 +1220,7 @@ int zebra_grs_retrieve(void *clientData, struct recRetrieveCtrl *p,
                 onode = node;
                 if (!(node = data1_map_record(p->dh, onode, map, mem)))
                 {
-                    p->diagnostic = 14;
+                    p->diagnostic = YAZ_BIB1_SYSTEM_ERROR_IN_PRESENTING_RECORDS;
                     nmem_destroy (mem);
                     return 0;
                 }