lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "SK R" <rsk....@gmail.com>
Subject Re: can't get docFreq of phrase
Date Tue, 20 Mar 2007 11:14:07 GMT
Hi Mark,
         Thanks for your reply.
          Could i get this match length (docFreq) without using
searcher.search(..) ?

          One more doubt is "Preformace for getting search length by using
searcher.search(...) is same as using reader.docFreq(..)??;

On 3/20/07, mark harwood <markharw00d@yahoo.co.uk> wrote:
>
>         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 <rsk.sen@gmail.com>
> 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: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message