IndexSearcher s=new IndexSearcher("/indexes/myindex"); PhraseQuery pq = new PhraseQuery(); pq.add(new Term("contents","test")); pq.add(new Term("contents","under")); int df=s.search(pq).length();
Cheers Mark ----- Original Message ---- From: SK R <[EMAIL PROTECTED]> To: java-user@lucene.apache.org Sent: Tuesday, 20 March, 2007 10:32:32 AM Subject: can't get docFreq of phrase Hi, I can get docFreq. of single term like (f1:test) by using indexReader.docFreq(new Term("f1","test")). But can't get docFreq. of phrase term like f2:"test under") by the same method. Is anything wrong in this code? Please help me to resolve this problem. Thanks & Regards RSK ___________________________________________________________ All New Yahoo! Mail – Tired of unwanted email come-ons? Let our SpamGuard protect you. http://uk.docs.yahoo.com/nowyoucan.html --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]