I'm having some issues with parsing of data with Digester and indexing with Lucene.

I'm parsing a xml collection, but the index seems to be empty.. just 2 files segments.gen and segments_1, and they both are 4kbytes big.

I've followed some tutorial from internet such as this one: Parsing, indexing, and searching XML with Digester and Lucene

This is my code: C code - 201 lines - codepad

This is the structure of XML document:

<?xml version='1.0' encoding='utf-8'?>
<collection>
<doc>
<id>361492738</id>
<title>Dan to the Right</title>
<description>This is ...Dan, he was to the right. Dan took a href="http://www.flickr.com/photos/danpb/361675920/"this/a shot.</description>
<time>18934934</time>
<tags>flickrmeetup rochester dan totheright 200701</tags>
<geo></geo>
<event>135961</event>
</doc>
<doc>
...
</doc>
..
</collection>

thanks