lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carlos Rodríguez Fernández" <carlosr...@gmail.com>
Subject TermDocs and "read"
Date Mon, 20 Oct 2008 08:27:32 GMT
Hello:
I have a problem with TermDocs#read operation.

the following code has an incorrect result:

            .....
            int termFreq=0;
            .....
            TermDocs termDocs = indexReader.termDocs(new
Term(((Field)field).name(),termCons));
            int[] freqs = new int[]{0};
            termDocs.read(new int[]{doc}, freqs);
            termFreq+=freqs[0];
            ....

the freqs array always return with a "[1]" for all terms and for all
documents. :S

Can you help me please?

Thanks a lot!
Carlos

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message