You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Falko Guderian <fa...@gmx.de> on 2005/05/18 16:38:47 UTC

Problem during evaluation of indexed documents

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