lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grant Ingersoll <gsing...@apache.org>
Subject Re: Frequencies sorted by frequencies
Date Sun, 01 Jun 2008 20:29:29 GMT
I don't know of a way, sorry.  Most of the Similarity methods do not  
take a field name.


On May 29, 2008, at 9:20 AM, Hider, Sandy wrote:

> Thanks for taking the time to answer.  I see what you mean.  The thing
> is I also plan on using the standard score.  Would there be a way to  
> use
> the both the standard score and the TF-only Score in a single index?
>
> Sandy
>
>
> -----Original Message-----
> From: Grant Ingersoll [mailto:gsingers@apache.org]
> Sent: Wednesday, May 28, 2008 2:34 PM
> To: java-user@lucene.apache.org
> Subject: Re: Frequencies sorted by frequencies
>
> I think you could override all the Similarity factors except tf() with
> 1, such that the term frequency is the only factor in the scoring.
> Then you just submit the term as a query.  Note, I think you will need
> to override the similarity during indexing, too, so that norm length  
> is
> turned off, too.  Note, I haven't tried it :-).  Use the explain()
> functionality to double check.  At any rate, it should be quick to  
> test.
>
> See
> http://lucene.apache.org/java/2_3_2/api/org/apache/lucene/search/Similar
> ity.html
>
> -Grant
>
>
> On May 28, 2008, at 10:48 AM, Hider, Sandy wrote:
>
>> Hi All,
>> I am trying to figure out a quick way to find the top N documents
>> sorted by frequency of a term.
>>
>> I found:
>>
>> IndexRead.termDocs()
>>
>> which provides an enumeration of doc() and freq() but it returns an
>> enumeration sorted by doc number.   Is there a way to get the results
>> sorted by freq?  Or is there another query I can run the find these
>> results?
>>
>> Thanks in advance,
>>
>> Sandy
>>
>
> --------------------------
> Grant Ingersoll
> http://www.lucidimagination.com
>
> Lucene Helpful Hints:
> http://wiki.apache.org/lucene-java/BasicsOfPerformance
> http://wiki.apache.org/lucene-java/LuceneFAQ
>
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>

--------------------------
Grant Ingersoll
http://www.lucidimagination.com

Lucene Helpful Hints:
http://wiki.apache.org/lucene-java/BasicsOfPerformance
http://wiki.apache.org/lucene-java/LuceneFAQ








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


Mime
View raw message