From 3cd0864b15450cf837b18fd47f362d796a64705e Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Wed, 4 Jun 2003 19:31:10 +0000 Subject: [PATCH] Make sherlockd calculate per-filetype number of matched documents, including those failing the FILETYPE filter. This breaks the nice abstraction of hiding all filtering under EXTENDED_ATTRS, but it will allow us to get rid of lots of STATS queries. --- lib/index.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/index.h b/lib/index.h index cb23ffd6..164383bc 100644 --- a/lib/index.h +++ b/lib/index.h @@ -77,8 +77,9 @@ enum card_flag { #define CA_GET_FILE_INFO(a) ((a)->type_flags & 0x1f) #define CA_GET_FILE_LANG(a) ((a)->type_flags & 0x80 ? 0 : CA_GET_FILE_INFO(a)) #define FILETYPE_ATTRS SMALL_SET_ATTR(ftype, FILETYPE, CA_GET_FILE_TYPE, ext_ft_parse) +#define MAX_FILE_TYPES 8 byte *ext_ft_parse(u32 *dest, byte *value, uns intval); -extern byte *custom_file_type_names[8]; +extern byte *custom_file_type_names[MAX_FILE_TYPES]; #else #define FILETYPE_ATTRS #endif @@ -91,7 +92,7 @@ byte *ext_lang_parse(u32 *dest, byte *value, uns intval); #define LANG_ATTRS #endif -#define EXTENDED_ATTRS CUSTOM_ATTRS FILETYPE_ATTRS LANG_ATTRS +#define EXTENDED_ATTRS CUSTOM_ATTRS LANG_ATTRS /* Beware, FILETYPE_ATTRS are handled separately */ /* String fingerprints */ -- 2.39.2