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 E4C5692DD for ; Tue, 12 Mar 2013 10:51:37 +0000 (UTC) Received: (qmail 7710 invoked by uid 500); 12 Mar 2013 10:51:35 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 7644 invoked by uid 500); 12 Mar 2013 10:51:35 -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 7621 invoked by uid 99); 12 Mar 2013 10:51:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Mar 2013 10:51:35 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ian.lea@gmail.com designates 209.85.223.171 as permitted sender) Received: from [209.85.223.171] (HELO mail-ie0-f171.google.com) (209.85.223.171) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Mar 2013 10:51:29 +0000 Received: by mail-ie0-f171.google.com with SMTP id 10so6196764ied.30 for ; Tue, 12 Mar 2013 03:51:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=9hp4fa5qS5SnLoeCrpdHmVb8VUCcTQApn1muXqScouw=; b=jGJUOGaktJlvUU3i3RTW4q2zEY6Sv3ZjwK7HgBO1YAqTPi/vjFFJ0UIsfcagbR/rpb lZWTKLQcYj1nHp/5Xn+x2aMksDEFqOUzVqr1xbWOBvmyL2jRtJ3bbVgYiiPEPcCnkoAV du7v8JoP6Wjct9pbr8g0a6Pbb7/KiGSUoiiTt9uxxOoUNVB2g+laSsbyGjQp8ynSmGuZ tjgMuwOb57fA4ncSApBrdkqCzer4EJdO3ax5n4zEqW+Gq+oU7KSNVOHktPbHXKIQua2S CXWJhX2W3r5O4zTwJoyU2tMvNsJq5xC6qMqnrgSex0sNGBBJNdzvbEgQQnf8CfqStgJE I5iA== X-Received: by 10.50.188.135 with SMTP id ga7mr11146536igc.58.1363085469498; Tue, 12 Mar 2013 03:51:09 -0700 (PDT) MIME-Version: 1.0 Received: by 10.50.203.42 with HTTP; Tue, 12 Mar 2013 03:50:49 -0700 (PDT) In-Reply-To: References: From: Ian Lea Date: Tue, 12 Mar 2013 10:50:49 +0000 Message-ID: Subject: Re: Lucene scoring To: java-user@lucene.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Sounds like a job for boosting. Document.setBoost() and/or Field.setBoost(). The former has gone away in lucene 4.x. See the migration guide. Or execute 2 searches, restricting the first to the contact docs or whichever you want to be top of the list. -- Ian. On Tue, Mar 12, 2013 at 7:36 AM, lucas van overberghe wrote: > Hi, > > We are currently using Hibernate Search but had some questions > regarding scoring. We are implementing a quicksearchengine in our > webapp but want to customize the scoring a bit. > > Let's say, you have a User named Peter, and a search is done on Peter. > The first result should therefore not be a document where his name > pops up a few times but instead be the contact details of Peter where > his name might popup only once. > > How would we go and implement this ? Is it neccesary to change the > Lucene scoring algorithm or is there a better/easier way? > > Thanks and kind regards, > > Lucas Van Overberghe > > --------------------------------------------------------------------- > 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