Hi, I am using phraseQuery to get the number of documents that the query appers in using the hits. I would like to know if there is any way in which i can get the number of times a phrase appears within each document.
I am currently using searching for the phrase "avoids deadlock" phraseQuery query =new PhraseQuery(); searcher = new IndexSearcher(rd); String temp ="avoids"; String temp2 ="deadlock"; Term synset2 = new Term("contents",temp); Term ss = new Term("contents",temp2); query.add(synset2); query.add( ss); Hits hits = searcher.search(query); System.out.println("number of hits="+((HitIterator)hits.iterator()).length() ); Any help would be greatly appreciated. -- Vishal Bathija Graduate Student Department of Computer Science & Systems Analysis Miami University Oxford,Ohio Phone: (513)-461-9239 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]