Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/idzebra
[idzebra-moved-to-github.git] / index / extract.c
index f70d824..d593ef8 100644 (file)
@@ -21,6 +21,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
     \brief indexes records and extract tokens for indexing and sorting
 */
 
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
 #include <stdio.h>
 #include <assert.h>
 #include <ctype.h>
@@ -209,6 +212,7 @@ static void snippet_add_complete_field(RecWord *p, int ord,
     if (last && start != last && zebra_maps_is_index(zm))
         zebra_snippets_appendn(h->snippets, p->seqno, 0, ord,
                                start, last - start);
+    p->seqno++;
 }
 
 static void snippet_add_incomplete_field(RecWord *p, int ord, zebra_map_t zm)
@@ -1855,6 +1859,7 @@ static void extract_add_complete_field(RecWord *p, zebra_map_t zm)
     if (!i)
        return;
     extract_add_string(p, zm, buf, i);
+    p->seqno++;
 }
 
 static void extract_add_icu(RecWord *p, zebra_map_t zm)