You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by AJIT RAJWADE <aj...@veritas.com> on 2002/06/05 08:49:13 UTC
Finding number of occurrences of a given word in a document using LUCENE
I am currently facing a difficulty...how do I find the number of occurrences of a particular word in a certain document. Currently, I get some value called as score which is difficult to interpret. I was told to use an interface called TermDocs...any more tips?
Thanks,
Ajit
Re: Finding number of occurrences of a given word in a document using LUCENE
Posted by Otis Gospodnetic <ot...@yahoo.com>.
I never needed to use this, but it looks like you can call
IndexReader's termDocs(Term) method.
That will give you TermDocs, which has a freq() method that may do what
you need.
Otis
--- AJIT RAJWADE <aj...@veritas.com> wrote:
> I am currently facing a difficulty...how do I find the number of
> occurrences of a particular word in a certain document. Currently, I
> get some value called as score which is difficult to interpret. I was
> told to use an interface called TermDocs...any more tips?
>
> Thanks,
> Ajit
>
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>