X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=blobdiff_plain;f=termlists.c;h=c9a9442f5c5f3c4d1937122e3618d417b1d5811f;hb=4af47baa0641ea00556a351127d7b75e9b6a903e;hp=fbf346e1996173b368b9ae6f411b2da49eb5c2de;hpb=d7967e62bb987396444404f5e6ed59bbda5f5131;p=pazpar2-moved-to-github.git diff --git a/termlists.c b/termlists.c index fbf346e..c9a9442 100644 --- a/termlists.c +++ b/termlists.c @@ -1,5 +1,5 @@ /* - * $Id: termlists.c,v 1.1 2006-11-24 20:29:07 quinn Exp $ + * $Id: termlists.c,v 1.3 2006-12-08 21:40:58 quinn Exp $ */ #include @@ -119,12 +119,11 @@ void termlist_insert(struct termlist *tl, const char *term) unsigned int bucket; struct termlist_bucket **p; - bucket = hash(term) & tl->hashmask; + bucket = hash((unsigned char *)term) & tl->hashmask; for (p = &tl->hashtable[bucket]; *p; p = &(*p)->next) { if (!strcmp(term, (*p)->term.term)) { - yaz_log(YLOG_LOG, "Found a matching term: %s", term); (*p)->term.frequency++; update_highscore(tl, &((*p)->term)); break; @@ -132,7 +131,6 @@ void termlist_insert(struct termlist *tl, const char *term) } if (!*p) // We made it to the end of the bucket without finding match { - yaz_log(YLOG_DEBUG, "Added a new term: %s", term); struct termlist_bucket *new = nmem_malloc(tl->nmem, sizeof(struct termlist_bucket)); new->term.term = nmem_strdup(tl->nmem, term);