Hi all,

  What I want to do is like this :


  Search for :  C++ Java Phyton


  And then the result will be displayed like this :


  document1.txt     C++(20 hits)    Java(15 hits)         Phyton(4 hits)
  document2.txt     C++(19 hits)    Java(14 hits)         Phyton(3 hits)
   document3.txt     C++(16 hits)    Java(3 hits)           Phyton(2 hits)


   I used IndexSearcher to search, but it seems IndexSearcher
can only display the score.
I think I have to use IndexReader, with TermVector, but I don't know
how to do that.

  If a phrase composed of 3 terms, should I crawl through all the
documents 3 times using IndexReader, just to do that ?
Or can I just do 1 time crawl, and can count all the terms' hits ?
And is Lucene capable to separate my phrase into terms, so
I don't have to write another code to separate the terms from phrase ?

  Any help would be appreciated.

Thanks

Reply via email to