You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by AJIT RAJWADE <aj...@veritas.com> on 2002/06/04 11:58:54 UTC

Finding number of occurrences of a word in a document.

Sir,

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.

Thanks,
Ajit

Re: Finding number of occurrences of a word in a document.

Posted by Peter Carlson <ca...@bookandhammer.com>.
Ajit,
This question should be asked to the Lucene user list. I am also posting
this email to the user list in case there are any follow-up questions or
other people have other suggestions.

Lucene does not return the number of occurrences for a word in a Hit, but
you can get this information using the TermDocs interface (see the javadoc).
I have never used this interface, but it looks like it will do the job.

--Peter



On 6/4/02 2:58 AM, "AJIT RAJWADE" <aj...@veritas.com> wrote:

> Sir,
> 
> 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.
> 
> Thanks,
> Ajit
> 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Finding number of occurrences of a word in a document.

Posted by Peter Carlson <ca...@bookandhammer.com>.
Ajit,
This question should be asked to the Lucene user list. I am also posting
this email to the user list in case there are any follow-up questions or
other people have other suggestions.

Lucene does not return the number of occurrences for a word in a Hit, but
you can get this information using the TermDocs interface (see the javadoc).
I have never used this interface, but it looks like it will do the job.

--Peter



On 6/4/02 2:58 AM, "AJIT RAJWADE" <aj...@veritas.com> wrote:

> Sir,
> 
> 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.
> 
> Thanks,
> Ajit
> 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>