Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 64337 invoked from network); 7 Oct 2005 12:58:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 7 Oct 2005 12:58:43 -0000 Received: (qmail 84280 invoked by uid 500); 7 Oct 2005 12:58:36 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 84258 invoked by uid 500); 7 Oct 2005 12:58:36 -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 84247 invoked by uid 99); 7 Oct 2005 12:58:35 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Oct 2005 05:58:35 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [69.55.225.129] (HELO ehatchersolutions.com) (69.55.225.129) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Oct 2005 05:58:38 -0700 Received: by ehatchersolutions.com (Postfix, from userid 504) id 6A93013E200A; Fri, 7 Oct 2005 08:58:12 -0400 (EDT) Received: from [128.143.167.108] (d-128-167-108.bootp.Virginia.EDU [128.143.167.108]) by ehatchersolutions.com (Postfix) with ESMTP id E268313E2007 for ; Fri, 7 Oct 2005 08:58:05 -0400 (EDT) Mime-Version: 1.0 (Apple Message framework v734) In-Reply-To: <9ce5095c0510070114l6813628boe52a7f4ba3a7040@mail.gmail.com> References: <9ce5095c0510070114l6813628boe52a7f4ba3a7040@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Erik Hatcher Subject: Re: Field length normalization Date: Fri, 7 Oct 2005 08:58:04 -0400 To: java-user@lucene.apache.org X-Mailer: Apple Mail (2.734) X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on javelina X-Spam-Level: X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.1 X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On Oct 7, 2005, at 4:14 AM, Sameer Shisodia wrote: > Hi, > Have started using Lucene recently so this might be a oft repeated > qn (Do point me to archives if any). > I'm storing multiple values of a field as a comma separated string > during indexing. > Obviously, some docs have more values and some only one and > so hits against those with multiple values for the field suffer. > Is there are trivial way of changing this without writing my own > version Similarity() completely ? Sure, you can subclass DefaultSimilarity and override and tweak just the lengthNorm() method. Be sure to use IndexWriter.setSimilarity() to get your custom one used. Erik --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org