Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 94998 invoked from network); 19 Nov 2007 16:55:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Nov 2007 16:55:38 -0000 Received: (qmail 73723 invoked by uid 500); 19 Nov 2007 16:55:19 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 73695 invoked by uid 500); 19 Nov 2007 16:55:19 -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 73684 invoked by uid 99); 19 Nov 2007 16:55:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Nov 2007 08:55:19 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of erickerickson@gmail.com designates 209.85.134.189 as permitted sender) Received: from [209.85.134.189] (HELO mu-out-0910.google.com) (209.85.134.189) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Nov 2007 16:55:22 +0000 Received: by mu-out-0910.google.com with SMTP id i10so1930393mue for ; Mon, 19 Nov 2007 08:55:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=C3GO0Vwrv/h/WFM9QC7QAo8hQdCDI6ck+o5FTya/vL4=; b=T7L1StHT//Md0IDEkk0vNMcKsDLU0w98MK/E/F7iWDkK/jNki43sPc9OGij99YUhF6ni6X+KHICtBb79LZCvle+v+5BHEBesPwGXr04c0wxF8YPSo12oiYgrh7JCL5V9BoCviW/nsw0CwpZKB2B8Cne6BWrBM1axg3Ul0yWoaf4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=BjSwfFpmTHpqTq05VvgzmmeEqMGpKCRmeY9VgDL5WcRu6GyBxvNWZzFRhFtcjyhHk5y/YFT+4Hw0OMQ09LC4ywcBTOUBk/FcStk+u5UE2Wbwim5AtqEPTcXfuXVGkfWGIwViWYFKN4nhu8YBqUQtCpssTjQLFqBaBZdxFRxWWP4= Received: by 10.82.140.20 with SMTP id n20mr13868699bud.1195491300448; Mon, 19 Nov 2007 08:55:00 -0800 (PST) Received: by 10.82.151.7 with HTTP; Mon, 19 Nov 2007 08:55:00 -0800 (PST) Message-ID: <359a92830711190855l77f66321kf53fc4020af2ba4b@mail.gmail.com> Date: Mon, 19 Nov 2007 11:55:00 -0500 From: "Erick Erickson" To: java-user@lucene.apache.org Subject: Re: Scoring for all the documents in the index relative to a query In-Reply-To: <604180.39834.qm@web60417.mail.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_13606_33365859.1195491300402" References: <604180.39834.qm@web60417.mail.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_13606_33365859.1195491300402 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Could you explain a bit more what problem you're trying to solve? The reason I ask is that your question doesn't make sense to me, since I have no idea what you expect by the term "negative score". My simplistic view has been that all the docs returned via Hits or HitCollector have scores > 0, and all the rest have scores of 0, and this view is supported by the explanation of HitCollector.collect " Called once for every non-zero scoring document, with the document number and its score." You might also get value from this page: http://lucene.apache.org/java/docs/scoring.html#Scoring Best Erick On Nov 19, 2007 11:05 AM, HAIDUC SONIA wrote: > Hi everyone, > > I am trying to obtain the score for each document in the index relative to > a given query. For example, if I have the query "search file", I am trying > to get the list of all documents in the index and their scores relative to > the given query. I tried first using Hits, which gave me the normalized > score. I thought that I don't see the whole list of documents and their > scores because of the normalization, so I tried using HitsCollector. But > even after using HitsCollector, I get the same number of matching documents, > so the normalization didn't exclude documents because of negative scoring. > Does Lucene actually compute the score for all the documents in the index or > just for matching documents? I really need to have the scores for all the > documents in the index relative to the query (even if negative), not just > the ones that contain the query terms(this is what Lucene considers > "matching documents", right?). Is this possible using Lucene? > > I really appreciate your time and effort! > Thanks, > Sonia > > > > > > ____________________________________________________________________________________ > Get easy, one-click access to your favorites. > Make Yahoo! your homepage. > http://www.yahoo.com/r/hs > ------=_Part_13606_33365859.1195491300402--