From: Adam Dickmeiss Date: Thu, 15 Jan 2009 13:49:21 +0000 (+0100) Subject: Align snippets handling of unknown register type with indexing X-Git-Tag: v2.0.36~5 X-Git-Url: http://git.indexdata.com/?a=commitdiff_plain;ds=inline;h=1d471f499b0be3a3990ad252ff9c19da0462f9aa;p=idzebra-moved-to-github.git Align snippets handling of unknown register type with indexing Align snippets handling of unknown register type with indexing. This is to ensure that for unknown index types, the snippets behave the same way as indexing.. If not, snippets, can not be generated correctly. --- diff --git a/index/extract.c b/index/extract.c index 69b449c..e61483c 100644 --- a/index/extract.c +++ b/index/extract.c @@ -302,7 +302,7 @@ static void snippet_token_add(RecWord *p) { struct snip_rec_info *h = p->extractCtrl->handle; ZebraHandle zh = h->zh; - zebra_map_t zm = zebra_map_get(zh->reg->zebra_maps, p->index_type); + zebra_map_t zm = zebra_map_get_or_add(zh->reg->zebra_maps, p->index_type); if (zm) {