Changed the index type to a string everywhere.
[idzebra-moved-to-github.git] / index / zsets.c
index fb997da..1a4686b 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: zsets.c,v 1.121 2007-04-16 08:44:32 adam Exp $
+/* $Id: zsets.c,v 1.124 2007-10-31 16:56:14 adam Exp $
    Copyright (C) 1995-2007
    Index Data ApS
 
@@ -542,7 +542,7 @@ struct sortKeyInfo {
     int relation;
     int ord;
     int numerical;
-    int index_type;
+    const char *index_type;
 };
 
 void resultSetInsertSort(ZebraHandle zh, ZebraSet sset,
@@ -579,7 +579,7 @@ void resultSetInsertSort(ZebraHandle zh, ZebraSet sset,
                 char this_entry_org[1024];
                 char other_entry_org[1024];
                 double diff;
-                int index_type = criteria[j].index_type;
+                const char *index_type = criteria[j].index_type;
                 zebra_term_untrans(zh, index_type, this_entry_org,
                                    this_entry_buf);
                 zebra_term_untrans(zh, index_type, other_entry_org,
@@ -885,7 +885,7 @@ ZEBRA_RES resultSetSortSingle(ZebraHandle zh, NMEM nmem,
             sort_criteria[i].ord = 
                 zebraExplain_lookup_attr_str(zh->reg->zei,
                                              zinfo_index_category_sort,
-                                             -1, sk->u.sortField);
+                                             0, sk->u.sortField);
             if (sks->which != Z_SortKeySpec_null
                 && sort_criteria[i].ord == -1)
             {
@@ -1273,7 +1273,7 @@ ZEBRA_RES zebra_snippets_hit_vector(ZebraHandle zh, const char *setname,
                struct ord_list *ol;
                for (ol = termid->ol; ol; ol = ol->next)
                {
-                   zebra_snippets_append(snippets, key.mem[key.len-1],
+                   zebra_snippets_append(snippets, key.mem[key.len-1], 0,
                                          ol->ord, termid->name);
                }
            }