-/* $Id: d1_attset.c,v 1.9 2006-05-19 13:49:33 adam Exp $
+/* $Id: d1_attset.c,v 1.10 2006-05-19 23:45:28 adam Exp $
Copyright (C) 1995-2006
Index Data ApS
int num;
char *name;
data1_att *t;
- data1_local_attribute *locals;
if (argc < 3)
{
yaz_log(YLOG_WARN, "%s:%d: Bad # of args to att", file, lineno);
continue;
}
+ if (argc > 3)
+ {
+ yaz_log(YLOG_WARN, "%s:%d: Local attributes not supported",
+ file, lineno);
+ }
num = atoi (argv[1]);
name = argv[2];
- if (argc == 3) /* no local attributes given */
- {
- locals = (data1_local_attribute *)
- nmem_malloc(mem, sizeof(*locals));
- locals->local = num;
- locals->next = 0;
- }
- else /* parse the string "local{,local}" */
- {
- char *p = argv[3];
- data1_local_attribute **ap = &locals;
- do
- {
- *ap = (data1_local_attribute *)
- nmem_malloc(mem, sizeof(**ap));
- (*ap)->local = atoi(p);
- (*ap)->next = 0;
- ap = &(*ap)->next;
- }
- while ((p = strchr(p, ',')) && *(++p));
- }
t = *attp = (data1_att *)nmem_malloc(mem, sizeof(*t));
t->parent = res;
t->name = nmem_strdup(mem, name);
t->value = num;
- t->locals = locals;
t->next = 0;
attp = &t->next;
}
-/* $Id: data1.h,v 1.13 2006-05-19 13:49:34 adam Exp $
+/* $Id: data1.h,v 1.14 2006-05-19 23:45:29 adam Exp $
Copyright (C) 1995-2006
Index Data ApS
struct data1_attset;
-typedef struct data1_local_attribute
-{
- int local;
- struct data1_local_attribute *next;
-} data1_local_attribute;
-
typedef struct data1_attset data1_attset;
typedef struct data1_att data1_att;
typedef struct data1_attset_child data1_attset_child;
data1_attset *parent; /* attribute set */
char *name; /* symbolic name of this attribute */
int value; /* attribute value */
- data1_local_attribute *locals; /* local index values */
data1_att *next;
};
-/* $Id: index.h,v 1.163 2006-05-19 23:20:24 adam Exp $
+/* $Id: index.h,v 1.164 2006-05-19 23:45:29 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
void strtab_del (struct strtab *t,
void (*func)(const char *name, void *info, void *data),
void *data);
-int index_char_cvt (int c);
-int index_word_prefix (char *string, int attset_ordinal,
- int local_attribute, const char *databaseName);
-
void zebraIndexLockMsg (ZebraHandle zh, const char *str);
void zebraIndexUnlock (ZebraHandle zh);
#define FNAME_ORG_LOCK "zebraorg.LCK"
#define FNAME_TOUCH_TIME "zebraidx.time"
-void zebra_load_atts (data1_handle dh, Res res);
-
int key_SU_decode (int *ch, const unsigned char *out);
int key_SU_encode (int ch, char *out);
void zebra_server_unlock (ZebraService zh, int commitPhase);
int zebra_server_lock_get_state (ZebraService zh, time_t *timep);
-#if 1
-typedef struct attent
-{
- int attset_ordinal;
- data1_local_attribute *local_attributes;
-} attent;
-#endif
-
int zebra_record_fetch (ZebraHandle zh, SYSNO sysno, int score,
zebra_snippets *hit_snippet, ODR stream,
oid_value input_format, Z_RecordComposition *comp,
-# $Id: bib1.att,v 1.1 2002-10-22 12:51:09 adam Exp $
+# $Id: bib1.att,v 1.2 2006-05-19 23:45:29 adam Exp $
# Bib-1 Attribute Set
name bib1
reference Bib-1
att 1013 Authority/format-id
att 1014 Concept-text
att 1015 Concept-reference
-att 1016 Any 1016,4,1005,62
+att 1016 Any
att 1017 Server-choice
att 1018 Publisher
att 1019 Record-source