Return-Path: Delivered-To: apmail-incubator-lucy-dev-archive@www.apache.org Received: (qmail 23180 invoked from network); 16 Apr 2011 16:05:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 16 Apr 2011 16:05:47 -0000 Received: (qmail 39778 invoked by uid 500); 16 Apr 2011 16:05:47 -0000 Delivered-To: apmail-incubator-lucy-dev-archive@incubator.apache.org Received: (qmail 39746 invoked by uid 500); 16 Apr 2011 16:05:47 -0000 Mailing-List: contact lucy-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: lucy-dev@incubator.apache.org Delivered-To: mailing list lucy-dev@incubator.apache.org Received: (qmail 39738 invoked by uid 99); 16 Apr 2011 16:05:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 16 Apr 2011 16:05:47 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: 207.173.203.201 is neither permitted nor denied by domain of david@kineticode.com) Received: from [207.173.203.201] (HELO smtp.kineticode.com) (207.173.203.201) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 16 Apr 2011 16:05:39 +0000 Received: from [10.0.1.20] (c-24-21-128-239.hsd1.or.comcast.net [24.21.128.239]) by smtp.kineticode.com (Postfix) with ESMTPSA id 4BD9D508343 for ; Sat, 16 Apr 2011 09:05:19 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1084) From: "David E. Wheeler" In-Reply-To: <4DA90CA0.6010509@peknet.com> Date: Sat, 16 Apr 2011 09:05:18 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <4DA90CA0.6010509@peknet.com> To: lucy-dev@incubator.apache.org X-Mailer: Apple Mail (2.1084) Subject: Re: [lucy-dev] Simplifying the Query Parser On Apr 15, 2011, at 8:27 PM, Peter Karman wrote: > This, I'm not so sure about. At least, it should be configurable, with = a > 'strict' flag or similar, which if enabled, would throw errors if = 'foo' was not > a defined field. Otherwise, depending on the user, we're in the realm = of silent > failure rather than gracious host. That just trades one level of complexity (heed_colons) for another = (strict). > Do we even have a feature for public/private fields atm? Yes, Marvin says it will search only those you list in the constructor, = unless you have heed_colons on and someone specifies a field not listed. > So what kind of parser should our QueryParser be? I don't think it can = be all > things to all users, so being most things to most users is actually a = pretty > good goal, imo. Agreed, but I think that the choice as to the kind of parser it "should = be" was made quite a long time ago. I think it makes a lot of sense, = though, for tool builders like you, to have an alternate, stricter = parser that's easier to build on top of reliably. > I think the focus on reliable, flexible *Query classes has been a good = design > choice to date, because it means that it is quite straightforward to = roll your > own query parser (as I have done), entirely suited to your = application's needs, > sidestepping the Lucy QueryParser altogether. That's good library = design, imo. So maybe there isn't a need for a strict parser? > I agree that Lucy QueryParser should get simpler over time, by losing = features, > but not convinced that the behavior you're proposing actually does = that. I'm > happy to be convinced though. Given the audience it currently targets (web search box users), I think = it makes sense to try to adhere to the principal of least astonishment. Best, David