lucene-java-user 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 Sat, 21 May 2005 10:04:39 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 in each case.
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-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message