Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 54683 invoked from network); 15 Oct 2010 13:27:52 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 15 Oct 2010 13:27:52 -0000 Received: (qmail 19281 invoked by uid 500); 15 Oct 2010 13:27:50 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 18677 invoked by uid 500); 15 Oct 2010 13:27:45 -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 18656 invoked by uid 99); 15 Oct 2010 13:27:44 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Oct 2010 13:27:44 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ian.lea@gmail.com designates 209.85.216.169 as permitted sender) Received: from [209.85.216.169] (HELO mail-qy0-f169.google.com) (209.85.216.169) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Oct 2010 13:27:38 +0000 Received: by qyk7 with SMTP id 7so1638721qyk.14 for ; Fri, 15 Oct 2010 06:27:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=YydGTKas8zaP2NEMRAOSYgyAgrpG2OEy78DITiyx5HY=; b=L5pVLiRaa9cRDwTqZWPIdhGwxYcqWUZwctDCf7yizgZePJYq1DxfUzxWyOZE4rPKBV kwfioQ8dQOIim0mNhlIi4mtxu73C+0+/hlWrjjNboKKscMvam6S6XsWsPoEUz7laKd7v cOlDQccSgGCEj8Po3movQleqGWRZNlmOMpCHA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=NA+cJ25vknjZuZkfyt53IwlSiy14tWDfx11gLuMyaaBRTv78rFGnBuTTtDvwLBjPoZ +fe5fUeLa0H3dv1R3xz4tBVIsG+Jnba3iCYS7g9AdpuITpi+A7K6MxL6js+9x6Di1dRh hn+Fs2P0JvLsY7qpSJYzHM+f/UykDSJupDHFE= Received: by 10.229.233.144 with SMTP id jy16mr684762qcb.293.1287149236982; Fri, 15 Oct 2010 06:27:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.51.18 with HTTP; Fri, 15 Oct 2010 06:26:56 -0700 (PDT) In-Reply-To: References: From: Ian Lea Date: Fri, 15 Oct 2010 14:26:56 +0100 Message-ID: Subject: Re: Overriding DefaultScore To: java-user@lucene.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org http://www.lucidimagination.com/blog/2009/08/05/getting-started-with-payloa= ds/ sounds a good place to start. A much simpler alternative, although without exact control, would be to use query boosting. There is also CustomScoreQuery - complex but powerful. -- Ian. On Fri, Oct 15, 2010 at 2:19 PM, Zaharije Pasalic wrote: > Can anybody explain or point me to couple of links where i can find > more info about payloads? > > Thx > > On Fri, Oct 15, 2010 at 11:09 AM, Danil =C5=A2ORIN w= rote: >> You could encode term score as payload while indexing, and use those >> payloads on search time. >> >> On Fri, Oct 15, 2010 at 11:30, Zaharije Pasalic >> wrote: >>> Hi >>> >>> my original problem is to index large number of documents which >>> contains 360 integers in rage from 0-90K. Searching it's a little bit >>> complicated - I need to find most similar documents where query data >>> is also 360 numbers in range 0-90K. But (there is always 'but') i need >>> to create score with some predefined weight table. Here is example: >>> >>> Index contains: >>> >>> DOC1 : 1, 3, 5 >>> DOC2 : 1, 100 >>> DOC3 : 1, 5 >>> >>> I need to find all documents which are 'like' this: >>> >>> SEARCH: 1,5,100 >>> >>> And suppose that i'm having table which says: "if value is larger than >>> 10 wight hit as 0.5, else as 1" (in real application this is more >>> complicated weight table). >>> >>> So for Query 1,5,100 i will have: >>> >>> DOC1: SCORE=3D2 =C2=A0 =C2=A0[1,5] >>> DOC3: SCORE=3D2 =C2=A0 =C2=A0[1,5] >>> DOC2: SCORE=3D1.5 [1,100 (100>10- wight 0.5] >>> >>> Searching is just: if hits occurs on field, increments score by 1*weigh= t(value) >>> >>> My first step was to create index with one field which contains all >>> 360 values and to remove normals from it. >>> >>> Now when i'm doing search like: >>> >>> "F:1 F:5 F:100" >>> >>> I'm getting results ok but score is not correct. Of course it gives me >>> score sorted by 'number of hits' (am I right?) but score value is not >>> calculated by increments of 1 nor i'm using wights at all. >>> >>> So, my question is - is this even possible with lucene and if can, can >>> you point me into some directions (i already looked a little bit at >>> DefaultSimilarity overriding). >>> >>> Thanks >>> >>> --------------------------------------------------------------------- >>> 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 >> >> > > --------------------------------------------------------------------- > 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