aslam bari wrote:
I am searching for a word "circle" in my indexed document list. It gives me
total document found 4 i.e. Hits. But now i want to get how many occurances are there in
each document i.e. frequency of words in result document.
Hello Aslam,
you should store the TermVector in the index as well:
doc.add(new Field("field name", "field value", Field.Store.YES,
Field.Index.TOKENIZED, Field.TermVector.YES));
"A term vector is a list of the document's terms and their number of
occurences in that document."
The IndexReader allows you to access the TermVector of a document:
TermFreqVector IndexReader.getTermFreqVector(int docNumber, String field)
I hope it helps.
Sören
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]