From java-dev-return-12391-apmail-lucene-java-dev-archive=lucene.apache.org@lucene.apache.org Sun Dec 04 16:02:55 2005 Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 84592 invoked from network); 4 Dec 2005 16:02:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 Dec 2005 16:02:55 -0000 Received: (qmail 30884 invoked by uid 500); 4 Dec 2005 16:02:52 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 30830 invoked by uid 500); 4 Dec 2005 16:02:51 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 30819 invoked by uid 99); 4 Dec 2005 16:02:51 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 Dec 2005 08:02:51 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [194.109.24.35] (HELO smtp-vbr15.xs4all.nl) (194.109.24.35) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 Dec 2005 08:02:50 -0800 Received: from k8l.lan (porta.xs4all.nl [80.127.24.69]) by smtp-vbr15.xs4all.nl (8.13.3/8.13.3) with ESMTP id jB4G2SNb039751 for ; Sun, 4 Dec 2005 17:02:28 +0100 (CET) (envelope-from paul.elschot@xs4all.nl) From: Paul Elschot To: java-dev@lucene.apache.org Subject: Re: "Advanced" query language Date: Sun, 4 Dec 2005 17:02:28 +0100 User-Agent: KMail/1.5.4 References: <20051202150322.99433.qmail@web26012.mail.ukl.yahoo.com> <200512041252.07982.paul.elschot@xs4all.nl> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200512041702.28397.paul.elschot@xs4all.nl> X-Virus-Scanned: by XS4ALL Virus Scanner X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On Sunday 04 December 2005 15:26, Erik Hatcher wrote: > > On Dec 4, 2005, at 6:52 AM, Paul Elschot wrote: > > I tried rewroting the XML query in exactly this way, with a > > few property=.. constructs: > > > > boostingQuery( > > matchQuery=moreLikeThis( > > percentTermsToMatch="0.25", > > docId="44", > > compareField("contents"), > > compareField("title")), > > downGradeQuery=simpleQuery("contents") > > .... > > etc. > > > > But then I concluded that a GUI would be better for human input. > > Nonetheless, this syntax is simpler than XML, so it might > > be more acceptable than XML for human input. > > I cannot at all fathom a use case where anything like this would be > human enterable. I realize, Paul, that you're after a human- > enterable syntax that can create sophisticated queries, but XML > certainly is not appropriate, or even a short-cut of XML (see YAML - > http://www.yaml.org/). It's a shame there isn't (that I can find) a > decent YAML parser in Java. Are there XML editors that can limit their output to a given stylesheet? In that case one only needs to predefine a style sheet for queries. > Almost all users want to enter "words separated by spaces", and very > little else. QueryParser succeeds fine for this purpose. Those are not the users that I'm thinking of. > I think we should focus on the machine-to-machine use case of > communicating a Query in this discussion. That's ok, but when a few simple constraints are enough to make it useful for humans that need the extra query power enough to be willing to enter more syntax, then why not? > > The problem is that query language operators form queries and have > > properties and subqueries with possibly different roles. > > The subqueries cause the need for nesting and the properties and roles > > cause the need for the property=... syntax. > > > I don't know XML that well. Does it have a facility to allow > > different roles > > for nested constructs? > > I'm not following what you mean by different roles. Could you > provide an example. For example the clauses in a boolean query can have these roles: required, optional, and excluded. Thinking about it, this would probably map to sth like: Is it possible in XML to predefine rc so that ... means: ... ? Regards, Paul Elschot --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org