lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack Krupansky" <j...@basetechnology.com>
Subject Re: Using alternative scoring mechanism.
Date Sun, 02 Dec 2012 16:36:11 GMT
I thought it was that simple too, but I couldn't find the 
"get/setSimilarityProvider" methods listed in that patch, and no mention in 
the Similarity class. Obviously this feature has morphed a bit since then. 
To cut to the chase, you still use the old methods for setting the 
similarity class (IndexSearcher#setSimilarity), but now you need to 
instantiate a PerFieldSimilarityWrapper that provides a "get" method for 
each field. It is mentioned in the Similarity javadoc, if you read it 
carefully enough.

See:
http://lucene.apache.org/core/4_0_0/core/org/apache/lucene/search/similarities/PerFieldSimilarityWrapper.html

This appear to be the change from that original design:
https://issues.apache.org/jira/browse/LUCENE-3749

-- Jack Krupansky

-----Original Message----- 
From: Erick Erickson
Sent: Sunday, December 02, 2012 9:54 AM
To: java-user
Subject: Re: Using alternative scoring mechanism.

I think you're looking for per-field similiarity, does this help?
https://issues.apache.org/jira/browse/LUCENE-2236

Note, in 4.0 only

Best
Erick


On Sat, Dec 1, 2012 at 1:43 PM, Eyal Ben Meir <eyalbm@gmail.com> wrote:

> Can one replace the basic scoring algorithm (TF/IDF) for a specific field,
> to use a different one?
>
> I need to compute similarity for NAME field.  The regular TF/IDF is not
> good
> enough, and I want to use a Name Recognition Engine as a scorer.
>
> How can it be done?
>
> Thanks,  Eyal.
>
> 


---------------------------------------------------------------------
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