From dev-return-88429-apmail-lucene-dev-archive=lucene.apache.org@lucene.apache.org Tue Feb 7 12:29:45 2012 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 7BDEE9F1B for ; Tue, 7 Feb 2012 12:29:45 +0000 (UTC) Received: (qmail 26680 invoked by uid 500); 7 Feb 2012 12:29:44 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 26488 invoked by uid 500); 7 Feb 2012 12:29:43 -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 26481 invoked by uid 99); 7 Feb 2012 12:29:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Feb 2012 12:29:42 +0000 X-ASF-Spam-Status: No, hits=3.5 required=5.0 tests=HTML_MESSAGE,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of michael.wechner@wyona.com designates 195.226.6.75 as permitted sender) Received: from [195.226.6.75] (HELO mail.wyona.com) (195.226.6.75) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Feb 2012 12:29:37 +0000 Received: from new-host-2.home (177-116.194-178.cust.bluewin.ch [178.194.116.177]) by mail.wyona.com (Postfix) with ESMTPA id E4A982DA097 for ; Tue, 7 Feb 2012 13:31:58 +0100 (CET) Message-ID: <4F311919.2000308@wyona.com> Date: Tue, 07 Feb 2012 13:29:13 +0100 From: Michael Wechner User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: dev@lucene.apache.org Subject: Re: more sql-like commands for solr References: <4F30EF6D.9090903@wyona.com> <4F30F4C3.1090707@wyona.com> In-Reply-To: Content-Type: multipart/alternative; boundary="------------020405010603010509040101" --------------020405010603010509040101 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Am 07.02.12 11:13, schrieb Li Li: > is the jsr implemented yet? AFAIK it's not complete, but since Jackrabbit is also using Lucene and considering posts like for example http://jackrabbit.510166.n4.nabble.com/Need-a-complete-JCR-JQOM-example-query-td3944788.html I would assume there is some active development. HTH Michael > I think I could first define this language by bnf and then use javacc > or antlr to implement. > I have recently written a query rewriter component for our products > which defines regular expression like language that can rewrite querys. > . and also we can learn something from http://jsqlparser.sourceforge.net/ > I have experimented it to check sql injections. > > On Tue, Feb 7, 2012 at 5:54 PM, Michael Wechner > > wrote: > > Am 07.02.12 10:43, schrieb Li Li: >> I just want solr providing this new feature and also want to >> know whether any other users need this feature. if possible, I'd >> like to participate in it. > > sounds good. I would also be interested in such a functionality. I > think the first step would be to define a mapping between sql and > lucene queries (without actually implementing it) and check > whether and how this is possible. > > It might be interesting to have a look at how jackrabbit is doing > it with > > http://www.day.com/specs/jcr/2.0/6_Query.html > > HTH > > Michael > >> >> On Tue, Feb 7, 2012 at 5:31 PM, Michael Wechner >> > wrote: >> >> Am 07.02.12 10:24, schrieb Li Li: >> >> hi all, >> we have used solr to provide searching service in many >> products. I found for each product, we have to do some >> configurations and query expressions. >> our users are not used to this. they are familiar with >> sql and they may describe like this: I want a query that >> can search books whose title contains java, and I will >> group these books by publishing year and order by >> matching score and freshness, the weight of score is 2 >> and the weight of freshness is 1. >> maybe they will be happy if they can use sql like >> statements to convey their needs. >> select * from books where title contains java group by >> pub_year order by score^2, freshness^1 >> also they may like they can insert or delete documents >> by delete from books where title contains java and >> pub_year between 2011 and 2012. >> we can define some language similar to sql and >> translate the to solr query string such as >> .../select/?q=+title:java^2 +pub_year:2011.... >> this may be equivalent to apache hive for hadoop. >> >> >> It's not clear to me whether you are asking a question or >> making a comment. Can you rephrase? >> >> Thanks >> >> Michael >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org >> >> For additional commands, e-mail: dev-help@lucene.apache.org >> >> >> > > --------------020405010603010509040101 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Am 07.02.12 11:13, schrieb Li Li:
is the jsr implemented yet?

AFAIK it's not complete, but since Jackrabbit is also using Lucene and considering posts like for example

http://jackrabbit.510166.n4.nabble.com/Need-a-complete-JCR-JQOM-example-query-td3944788.html

I would assume there is some active development.

HTH

Michael
I think I could first define this language by bnf and then use javacc or antlr to implement.
I have recently written a query rewriter component for our products which defines regular expression like language that can rewrite querys. 
. and also we can learn something from http://jsqlparser.sourceforge.net/ 
I have experimented it to check sql injections. 

On Tue, Feb 7, 2012 at 5:54 PM, Michael Wechner <michael.wechner@wyona.com> wrote:
Am 07.02.12 10:43, schrieb Li Li:
I just want solr providing this new feature  and also want to know whether any other users need this feature. if possible, I'd like to participate in it.

sounds good. I would also be interested in such a functionality. I think the first step would be to define a mapping between sql and lucene queries (without actually implementing it) and check whether and how this is possible.

It might be interesting to have a look at how jackrabbit is doing it with

http://www.day.com/specs/jcr/2.0/6_Query.html

HTH

Michael


On Tue, Feb 7, 2012 at 5:31 PM, Michael Wechner <michael.wechner@wyona.com> wrote:
Am 07.02.12 10:24, schrieb Li Li:

hi all,
   we have used solr to provide searching service in many products. I found for each product, we have to do some configurations and query expressions.
   our users are not used to this. they are familiar with sql and they may describe like this: I want a query that can search books whose title contains java, and I will group these books by publishing year and order by matching score and freshness, the weight of score is 2 and the weight of freshness is 1.
   maybe they will be happy if they can use sql like statements to convey their needs.
   select * from books where title contains java group by pub_year order by score^2, freshness^1
   also they may like they can insert or delete documents by delete from books where title contains java and pub_year between 2011 and 2012.
   we can define some language similar to sql and translate the to solr query string such as .../select/?q=+title:java^2 +pub_year:2011....
   this may be equivalent to apache hive for hadoop.

It's not clear to me whether you are asking a question or making a comment. Can you rephrase?

Thanks

Michael


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org





--------------020405010603010509040101--