lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Falko Guderian <mail.to.fa...@gmx.de>
Subject Problem during evaluation of indexed documents
Date Wed, 18 May 2005 14:39:17 GMT
Dir members,

I indexed 20 text documents and want to get information which keywords
are in which documents.
I done it with similar code as followed:

<code>
Terms terms = indexReader.terms(new Term("content", ""));
TermDocs termDocs = indexReader.termDocs();
while ("content".equals(terms.term().field())) {
        termDocs.seek(terms);
                    for(int i = 0; i < numDocs; i++) {
                        if(i == termDocs.doc()){
                            termDocs.next();
                        }
                    }
                    if (!terms.next()) break;
                } // end if
                else {
                    if (!terms.next()) break;
                }
            }
</code>

There are no problem during indexing time.
After writing the results to an text file the first document contains
all indexed keywords and the other  19 docs contain the correct number
of keywords.
I can't find my fault.

Is there an explanation?
I would be pleased if someone could help me.

Best regards
Falko Guderian



---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message