Return-Path: X-Original-To: apmail-lucene-java-user-archive@www.apache.org Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 08B13D865 for ; Sun, 2 Dec 2012 16:36:50 +0000 (UTC) Received: (qmail 24388 invoked by uid 500); 2 Dec 2012 16:36:48 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 24098 invoked by uid 500); 2 Dec 2012 16:36:46 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 24070 invoked by uid 99); 2 Dec 2012 16:36:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Dec 2012 16:36:46 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of SRS0=rD5/u8=J4=basetechnology.com=jack@yourhostingaccount.com designates 65.254.254.75 as permitted sender) Received: from [65.254.254.75] (HELO mailout08.yourhostingaccount.com) (65.254.254.75) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Dec 2012 16:36:38 +0000 Received: from mailscan07.yourhostingaccount.com ([10.1.15.7] helo=mailscan07.yourhostingaccount.com) by mailout08.yourhostingaccount.com with esmtp (Exim) id 1TfCWe-0005w8-LF for java-user@lucene.apache.org; Sun, 02 Dec 2012 11:36:16 -0500 Received: from impout02.yourhostingaccount.com ([10.1.55.2] helo=impout02.yourhostingaccount.com) by mailscan07.yourhostingaccount.com with esmtp (Exim) id 1TfCWd-0005No-Ek for java-user@lucene.apache.org; Sun, 02 Dec 2012 11:36:15 -0500 Received: from authsmtp12.yourhostingaccount.com ([10.1.18.12]) by impout02.yourhostingaccount.com with NO UCE id WgcF1k0020FdXoS01gcFit; Sun, 02 Dec 2012 11:36:15 -0500 X-Authority-Analysis: v=2.0 cv=HIVB5/Rv c=1 sm=1 a=yH02RjTyxywMAIqhn74x1Q==:17 a=aQzbgH187woA:10 a=2QbHZtMvOTAA:10 a=3jZET7lWBKwA:10 a=8nJEP1OIZ-IA:10 a=jvYhGVW7AAAA:8 a=x8nnNw1ZEkYA:10 a=mV9VRH-2AAAA:8 a=pGLkceISAAAA:8 a=-716A_wW3x2c_aAepfYA:9 a=wPNLvfGTeEIA:10 a=nTfBdMx99VAA:10 a=MSl-tDqOz04A:10 a=t1ijpx9AV50gTBtUFlM2vg==:117 X-EN-OrigOutIP: 10.1.18.12 X-EN-IMPSID: WgcF1k0020FdXoS01gcFit Received: from 207-237-113-14.c3-0.nyr-ubr1.nyr.ny.cable.rcn.com ([207.237.113.14] helo=JackKrupansky) by authsmtp12.yourhostingaccount.com with esmtpa (Exim) id 1TfCWd-00031V-2v for java-user@lucene.apache.org; Sun, 02 Dec 2012 11:36:15 -0500 Message-ID: <197793DBC3D1401780BFB1D7AB0FC0E7@JackKrupansky> From: "Jack Krupansky" To: References: <94EEA0B7ED3A4D42B83B91E1A5B3AF74@eyalNB> In-Reply-To: Subject: Re: Using alternative scoring mechanism. Date: Sun, 2 Dec 2012 11:36:11 -0500 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Mailer: Microsoft Windows Live Mail 15.4.3555.308 X-MimeOLE: Produced By Microsoft MimeOLE V15.4.3555.308 X-EN-UserInfo: e0a4b55451ed9f27313ebf02e3d4348d:fc4a93e1349e680c52bdd723c0ab3ef6 X-EN-AuthUser: jack@basetechnology.com Sender: "Jack Krupansky" X-EN-OrigIP: 207.237.113.14 X-EN-OrigHost: 207-237-113-14.c3-0.nyr-ubr1.nyr.ny.cable.rcn.com X-Virus-Checked: Checked by ClamAV on apache.org 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 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