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 44C33102C1 for ; Mon, 9 Dec 2013 17:42:05 +0000 (UTC) Received: (qmail 18673 invoked by uid 500); 9 Dec 2013 17:42:02 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 18529 invoked by uid 500); 9 Dec 2013 17:41:58 -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 18518 invoked by uid 99); 9 Dec 2013 17:41:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Dec 2013 17:41:56 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [74.125.82.51] (HELO mail-wg0-f51.google.com) (74.125.82.51) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Dec 2013 17:41:49 +0000 Received: by mail-wg0-f51.google.com with SMTP id b13so3729555wgh.6 for ; Mon, 09 Dec 2013 09:41:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=0qA5zzbg8xdryMqCZc377hOpt1rUS6Mg40kNuN1ehlM=; b=eT34lhi0KRc/Oo8v2x9sJRwYpMLx94evMRmsg7f4Kd/p4hRbPwzEJNjC6FSDISCr7C 95c0pGU+RKHqNVcxQGdf2aNNDuy7FbjwyYAiwc/cC6EW5KwEVnwpYQ+L4ZdpFjT+Nk6A VOvm4sO/Xa8yE0R4+oAkVoOgCk02iXeEKrXGiqpzDhCD6j5U65IMuSm76XC6dg0Xiqyy dueDdQMDc0lSHsfay/G5n9wGXZ3A1aQr+MhKmDWLJWTtXuYdWHzA2cd3HcE2chk+RYV9 m4OoJlgTENH8j/k7uimVCuBE6FRvOftuJjcgvzeh7tXyYTK6xjnW6peQ10ssThJ/qoTO ZFRA== X-Gm-Message-State: ALoCoQkZZ0/G3EUW9xzwdYUaoQHfMTfdjpmFjiB6WbTFc8v54J63huvvgTHLu+WEPJaRQNVyb/Dt MIME-Version: 1.0 X-Received: by 10.180.10.135 with SMTP id i7mr15340176wib.1.1386610888952; Mon, 09 Dec 2013 09:41:28 -0800 (PST) Received: by 10.227.153.3 with HTTP; Mon, 9 Dec 2013 09:41:28 -0800 (PST) X-Originating-IP: [12.133.176.59] Date: Mon, 9 Dec 2013 09:41:28 -0800 Message-ID: Subject: Changing similarity at query time From: Ivan Brusic To: java-user@lucene.apache.org Content-Type: multipart/alternative; boundary=001a11c2b6407a5fa504ed1d8145 X-Virus-Checked: Checked by ClamAV on apache.org --001a11c2b6407a5fa504ed1d8145 Content-Type: text/plain; charset=ISO-8859-1 I am currently using document-level boosts, which really translates to changing the norm for every field under the covers. As part of an experiment, I want to remove the boost, but that would require either re-indexing content or changing the scoring algorithm (similarity). If I create my own similarity, which would be identical to the default/TFIDF similarity but with the norm hardcoded to 1.0. The Lucene source warns against such behavior. I am assuming this is because it appears computeNorm is only run at index time,but shouldn't I be able to override score() and ignore the decodeNormValue calculation? Cheers, Ivan --001a11c2b6407a5fa504ed1d8145--