projects
/
pazpar2-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3571462
)
relevance: avoid false hits for whitespace tokens
author
Adam Dickmeiss
<adam@indexdata.dk>
Tue, 18 Sep 2012 12:32:29 +0000
(14:32 +0200)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Tue, 18 Sep 2012 12:32:29 +0000
(14:32 +0200)
For example, & could be turned into an empty string. And that
would occur nowhere else, giving a high inverse document frequency!
src/relevance.c
patch
|
blob
|
history
diff --git
a/src/relevance.c
b/src/relevance.c
index
b9fc0e1
..
a3ee82d
100644
(file)
--- a/
src/relevance.c
+++ b/
src/relevance.c
@@
-50,7
+50,7
@@
static int word_entry_match(struct word_entry *entries, const char *norm_str,
{
for (; entries; entries = entries->next)
{
- if (!strcmp(norm_str, entries->norm_str))
+ if (*norm_str && !strcmp(norm_str, entries->norm_str))
{
const char *cp = 0;
int no_read = 0;