Re: Num of a term in a Doc

2006-06-02 Thread Grant Ingersoll
You can do this a couple of different ways (at least): 1. Use term vectors. See http://www.cnlp.org/apachecon2005 for an intro, search on this list, or look in Erik and Otis book Lucene In Action. This will be the fastest way, but will require more space in your index to store the term vector

Num of a term in a Doc

2006-06-02 Thread Mary S
Hi, I want to get the freq of a term in a Doc. public int termFreq( int docID, String termName ) { IndexReader reader = IndexReader.open(directory); Document doc = reader.document(docID); int FreqForTerm = doc ??? return FreqForTerm; } I didn't find what I want in the archives.