Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5D67CE9C3 for ; Mon, 25 Feb 2013 14:52:21 +0000 (UTC) Received: (qmail 62629 invoked by uid 500); 25 Feb 2013 14:52:19 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 62447 invoked by uid 500); 25 Feb 2013 14:52:19 -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 62407 invoked by uid 99); 25 Feb 2013 14:52:18 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Feb 2013 14:52:18 +0000 Date: Mon, 25 Feb 2013 14:52:18 +0000 (UTC) From: "Erik Hatcher (JIRA)" To: dev@lucene.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SOLR-839) XML Query Parser support MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SOLR-839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13585897#comment-13585897 ] Erik Hatcher commented on SOLR-839: ----------------------------------- With the latest patch, these queries work (borrowed from SOLR-4351's tests): {code} 11 Now Cow brow mul(foo_i,2) id:10 10 text:Cow -id:1 {code} The "object parser" path worked easily, but it's not as powerful as it needs to be. There needs to be a way to make BooleanQuery's (without having to use the lucene query parser) and then, like the XMLQueryParser, do stuff with span queries and so on. Maybe it's not worthwhile to have both JSON and XML query parsing as they both should probably use the same infrastructure. But I would hate to see a JSON form of XSLT used here. Ideally, the query "tree" would be defined server-side and lean/clean parameters would be passed in to fill in the blanks, but also possibly having some logic based on the values of the parameters (&in_stock=true, would if specified add a filter for inStock:true, for example) The XMLQParser in the last patch has xsl capability as well, so that you could define id.xsl to be: {code} {code} Then using &defType=xml&xsl=id&id=SOLR1000 a term query will be generated. (this is too simple of an example, as there would be other leaner/cleaner ways to do this exact one) > XML Query Parser support > ------------------------ > > Key: SOLR-839 > URL: https://issues.apache.org/jira/browse/SOLR-839 > Project: Solr > Issue Type: New Feature > Components: query parsers > Affects Versions: 1.3 > Reporter: Erik Hatcher > Assignee: Erik Hatcher > Fix For: 5.0 > > Attachments: lucene-xml-query-parser-2.4-dev.jar, SOLR-839-object-parser.patch, SOLR-839.patch > > > Lucene contrib includes a query parser that is able to create the full-spectrum of Lucene queries, using an XML data structure. > This patch adds "xml" query parser support to Solr. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org