lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From csahat <csa...@gmail.com>
Subject Counting term frequency without using Explanation
Date Wed, 07 Feb 2007 14:26:21 GMT
Hi all,

  I'm so sorry if this question already answered before in this list, but I
already search
the list, and I couldn't find the answer.

   This is what I want to do :

  When the user type in the query, for example "WebSphere Java",
Lucene will show not only the score, but showing the term count per document
as well, like this

  doc1    0.8333          websphere=3, Java = 2
  doc2    0.817            websphere=2, Java=2


  I already tried to implement with TermFreqVector, but TermFreqVector show
all the
terms in the field, instead what I want is only the terms that happen in the
query.
I already tried using TermDocs as well, but it always gave result 0.

  I tried using Explanation class, using toString method, but I have to
"clean"
the information.


  Is there any "direct" way to do this in Lucene ?  Or perhaps someone can
give me a hint ?

  Thanks in advance

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