lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julien Nioche" <Julien.Nio...@lingway.com>
Subject Re: Term Collection Frequency?
Date Wed, 04 Aug 2004 14:05:31 GMT
if you need the number of docs in which a given term appears you can use the
method docfreq
http://jakarta.apache.org/lucene/docs/api/org/apache/lucene/index/IndexReader.html#docFreq(org.apache.lucene.index.Term)

otherwise you can use
http://jakarta.apache.org/lucene/docs/api/org/apache/lucene/index/IndexReader.html#termDocs(org.apache.lucene.index.Term)
 to count the total number of occurences using the TermDocs object



----- Original Message ----- 
From: "ABDOU Samir" <samir.abdou@unine.ch>
To: "Lucene Developers List" <lucene-dev@jakarta.apache.org>
Sent: Wednesday, August 04, 2004 2:25 PM
Subject: RE: Term Collection Frequency?


What about the frequency of any given term in the whole collection!?

Calculate this at runtime may affect considerably performance!

Thanks,


-----Message d'origine-----
De : Erik Hatcher [mailto:erik@ehatchersolutions.com]
Envoyé : mercredi, 4. août 2004 12:25
À : Lucene Developers List
Objet : Re: Term Collection Frequency?

The new term vector feature will give you this exact information for a
particular document or field.

Erik


On Aug 4, 2004, at 3:59 AM, ABDOU Samir wrote:

> Hi,
>
> In order to implement a new search model within Lucene (probabilistic),
> I need a collection frequency of each term (the number of occurrences
> of
> a term within a collection). So, what would be the best way to
> implement
> this?
>
> Any suggestions, ideas... are welcome.
>
> Thanks,
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Mime
View raw message