Return-Path: Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: (qmail 31914 invoked from network); 2 Dec 2010 18:34:31 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 2 Dec 2010 18:34:31 -0000 Received: (qmail 78088 invoked by uid 500); 2 Dec 2010 18:34:30 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 78006 invoked by uid 500); 2 Dec 2010 18:34:30 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 77999 invoked by uid 99); 2 Dec 2010 18:34:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Dec 2010 18:34:30 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of yseeley@gmail.com designates 209.85.161.48 as permitted sender) Received: from [209.85.161.48] (HELO mail-fx0-f48.google.com) (209.85.161.48) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Dec 2010 18:34:23 +0000 Received: by fxm2 with SMTP id 2so7062270fxm.35 for ; Thu, 02 Dec 2010 10:34:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:reply-to:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; bh=EF2JLEao2FqCh3TUK2owQXfVCOfLKR+zlxXFTdvqGSE=; b=YOFCZrxKsgHN46SdnTnyAYa0m6V9HRuJxBRPZ73fpYfYYpLPE1YESf3uwA3kN2oN05 3uQ2BuWO2hIcSg/9Vw12bwyGydnAG2/a0Nhtr8pldNY0jvaY0fXkimGxIP3YTNO0WzBj H5xPptUkZajLWTg2stdi8lLNq2YKop7bljwss= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:reply-to:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=XExXB/T6KneCLnb40DfE6nRhQ4qW3uhskDMErEaKUFFXZN6A+vSCMngi+a2HcKA87E Cea8aN8fO8U6WngzQ4Yn5SpJhx+xcNI1u59lgg1M60MVYBHnT2t3lmE9ryFIzCiufsOx y8BgzzAY8j+zhp1+FzpRJq+o4l2nlFIbhIo2U= MIME-Version: 1.0 Received: by 10.223.120.73 with SMTP id c9mr498117far.50.1291314843014; Thu, 02 Dec 2010 10:34:03 -0800 (PST) Sender: yseeley@gmail.com Reply-To: yonik@lucidimagination.com Received: by 10.223.74.202 with HTTP; Thu, 2 Dec 2010 10:34:02 -0800 (PST) In-Reply-To: <43EF22FC-6E13-4503-9372-60B3C6BF0283@apache.org> References: <20100925210611.1CB0623888FE@eris.apache.org> <43EF22FC-6E13-4503-9372-60B3C6BF0283@apache.org> Date: Thu, 2 Dec 2010 13:34:02 -0500 X-Google-Sender-Auth: JcCL-uZecmfy0_owFD3TG4JD4Y4 Message-ID: Subject: Re: svn commit: r1001318 - in /lucene/dev/trunk/solr: CHANGES.txt src/java/org/apache/solr/search/FunctionQParser.java src/test/org/apache/solr/search/QueryParsingTest.java src/test/org/apache/solr/search/function/TestFunctionQuery.java From: Yonik Seeley To: dev@lucene.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Thu, Dec 2, 2010 at 12:58 PM, Grant Ingersoll wrot= e: [...] > =A0=A0=A0=A0flds =3D sort.getSort(); > =A0=A0=A0=A0assertEquals(flds[0].getType(), SortField.FLOAT); > =A0=A0=A0=A0assertEquals(flds[0].getField(), "weight"); > - > - =A0=A0=A0try { > - =A0=A0=A0=A0=A0//bad number of parens, but the function parser can hand= le an extra > close > - =A0=A0=A0=A0=A0sort =3D QueryParsing.parseSort("pow(weight,2)) desc, bd= ay asc", > schema); > - =A0=A0=A0} catch (SolrException e) { > - =A0=A0=A0=A0=A0assertTrue(false); > - =A0=A0=A0} > +gvim > =A0=A0=A0=A0//Test literals in functions > =A0=A0=A0=A0sort =3D QueryParsing.parseSort("strdist(foo_s, \"junk\", jw)= desc", > schema); > =A0=A0=A0=A0flds =3D sort.getSort(); > > Namely, it looks like like we had a test that checked for dealing with ex= tra > parens. > Then, perhaps you made some typo that inserted the chars: gvim in > place of that test. Yeah - the window you see isn't necessarily the window that has the focus := -( > =A0Subsequently in rev=A01001320 you kind of reverted the > commit by removing the gvim, but did you intend to restore the test or ar= e > you seeing it as a bad test? It was a bad test. Tests should test for desired functionality, not quirks or implementation details of the current implementation. The fact that the past implementation did not error on something like "add(a,b))" was a quirk/bug, not a feature. -Yonik http://www.lucidimagination.com --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org