Question on searching and indexing in Lucene
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Gooy_Goo
Posted On:   Sunday, July 17, 2005 10:49 PM

Hi, I'm kinda new in looking at Lucene. I was trying to access the TermFrequencyVectors of each document stored in the index built by Lucene through IndexReader class. What I found is that the method to get the "TermFrequencyVector" which is IndexReader.getTermFreqVector(), returns mostly "null" because each field of the document has "isTermVectorStored()" as "false". This got me thinking. If term frequency vector is not stored, then how does Lucene search its index? I thought this vector needs to be available so that queries can be compared and ranking can be calculated? I think I'm missing a step somewhere. Can someone please clarify me? Also, how do I actually then access   More>>

Hi,

I'm kinda new in looking at Lucene. I was trying to access the TermFrequencyVectors of each document stored in the index built by Lucene through IndexReader class.

What I found is that the method to get the "TermFrequencyVector" which is IndexReader.getTermFreqVector(), returns mostly "null" because each field of the document has "isTermVectorStored()" as "false".

This got me thinking. If term frequency vector is not stored, then how does Lucene search its index? I thought this vector needs to be available so that queries can be compared and ranking can be calculated? I think I'm missing a step somewhere. Can someone please clarify me?

Also, how do I actually then access the terms that are 'indexed' for each document? Which class or method do I use to access them? (i.e. is there a method like "getTerms(documentID) returns "All Terms indexed for this document"?

thanks in advance!

   <<Less
About | Sitemap | Contact