Return-Path: Delivered-To: apmail-lucene-solr-user-archive@locus.apache.org Received: (qmail 33270 invoked from network); 21 Jun 2007 17:04:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Jun 2007 17:04:36 -0000 Received: (qmail 73487 invoked by uid 500); 21 Jun 2007 17:04:37 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 73464 invoked by uid 500); 21 Jun 2007 17:04:37 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Received: (qmail 73455 invoked by uid 99); 21 Jun 2007 17:04:37 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Jun 2007 10:04:37 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of yseeley@gmail.com designates 64.233.162.225 as permitted sender) Received: from [64.233.162.225] (HELO nz-out-0506.google.com) (64.233.162.225) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Jun 2007 10:04:33 -0700 Received: by nz-out-0506.google.com with SMTP id x7so531753nzc for ; Thu, 21 Jun 2007 10:04:12 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=nJdZaGcSgV4NecIjOOX6/zJ4jIZ0gQBQKgdV5Ki4v35haCrU4Ibda0TDUH0jZdFpD8ZXwW/ezn41I46U41iCUPfG9SFhRYpXlSf0Na0HqWIU87ByUzOcoJlr3eeKBQgS3QgKDrKCqUPWnsp3JAsF15xjx+aeg1jghCWD2k0I+3E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=HdDxza7bC1TjXBaiGPU310c3TyqgkF4sDsyKdu++DNeH+cceNNx8ORMrf7LTtGN1otV7N3Bj52l8Kmw4swpN+4EXhsgbDur3ItW1lDWpevkNZqW3PoAhEmU/Oj7EwloctfGjsc4ZHUph4SGwZW6pbuOe6zAAavd/t5Hm/CEA+VY= Received: by 10.115.17.1 with SMTP id u1mr1846427wai.1182445451585; Thu, 21 Jun 2007 10:04:11 -0700 (PDT) Received: by 10.142.113.13 with HTTP; Thu, 21 Jun 2007 10:04:11 -0700 (PDT) Message-ID: Date: Thu, 21 Jun 2007 13:04:11 -0400 From: "Yonik Seeley" Sender: yseeley@gmail.com To: solr-user@lucene.apache.org Subject: Re: DismaxRequestHandler reports sort by score as invalid In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <467A903E.8040109@gmail.com> X-Google-Sender-Auth: 2fcc2fd945252d9e X-Virus-Checked: Checked by ClamAV on apache.org A little background: I originally conceived of query operation chains (based on some of my previous hacking in mechanical investing stock screens: select all stocks; take top 10% lowest PE; then take the top 20 highest growth rate; then sort descending by 13 week relative strength). So, I thought that the next thing after a query *might* be a sort, so getSort() shouldn't throw an exception if it wasn't. I think this idea is now outdated (we know when we have a sort spec) and an exception should just be thrown on a syntax error. -Yonik On 6/21/07, J.J. Larrea wrote: > Because "score desc" is the default Lucene & Solr behavior when no explicit sort is specified, QueryParsing.parseSort() returns a null sort so that the non-sort versions of the query execution routines get called. However the caller SolrPluginUtils.parseSort issues that warning whenever it gets a null sort. Perhaps that interaction should be altered, or perhaps it should be left in as a sort of "are you sure you want to tell me what I already know?", er, warning. But as it stands you can simply ignore it, or else leave the sort off entirely when it is "score desc"; if the behavior were different in those two cases it would certainly be a bug, but as you noted that's not the case. > > - J.J. > > At 10:50 AM -0400 6/21/07, gerard sychay wrote: > >Hello all, > > > >This is a minor issue and does not affect Solr operation, but I could not find it in the issue tracking. > > > >To reproduce: > > > >- I set up a Solr server with the example docs indexed by following the Solr tutorial. > > > >- I clicked on the following example search under the "Sorting" section: > > > >http://localhost:8983/solr/select/?indent=on&q=video&sort=score+desc > > > >- I added a "qt" parameter to try out the DisMax Request Handler: > > > >http://localhost:8983/solr/select/?indent=on&q=video&sort=score+desc&qt=dismax > > > >- In the Solr output, I get: > > > >WARNING: Invalid sort "score desc" was specified, ignoring Jun 21, 2007 10:33:37 AM org.apache.solr.core.SolrCore execute > >INFO: /select/ sort=score+desc&indent=on&qt=dismax&q=video 0 131 > > > >The WARNING line is the issue. It does not seem that it should be there. But as I said, it does not appear to affect operation as the results are sorted by score descending anyway (because that is the default?). > >