Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 72817 invoked from network); 3 Aug 2008 09:10:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Aug 2008 09:10:27 -0000 Received: (qmail 21824 invoked by uid 500); 3 Aug 2008 09:10:20 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 21777 invoked by uid 500); 3 Aug 2008 09:10:20 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 21766 invoked by uid 99); 3 Aug 2008 09:10:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Aug 2008 02:10:20 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [209.191.91.153] (HELO web37506.mail.mud.yahoo.com) (209.191.91.153) by apache.org (qpsmtpd/0.29) with SMTP; Sun, 03 Aug 2008 09:09:24 +0000 Received: (qmail 63885 invoked by uid 60001); 3 Aug 2008 09:08:47 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-Mailer:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Message-ID; b=dSsxB1aoBusnktEl5bRzrb/hBJfa1OdhvOeu+F979gyL2G8bPfrr7mXSz0em8u/8VAjq8XIpFzlpG7dBVtTpUmf4GViCpSB+Ze703E+zANdjffQzmqy5r23cGCTkDsbwnv1jSqpg/B49aLOJMZ+/Fz2Tkrn0jXMrGk8q8HJnBOE=; Received: from [161.139.100.66] by web37506.mail.mud.yahoo.com via HTTP; Sun, 03 Aug 2008 02:08:45 PDT X-Mailer: YahooMailWebService/0.7.218 Date: Sun, 3 Aug 2008 02:08:45 -0700 (PDT) From: Siti Rochimah Reply-To: siti_r@yahoo.com Subject: Re: query API for program-generated query (please help..) To: java-user@lucene.apache.org In-Reply-To: <359a92830808021035y70015eb8ica70ce5248092a2e@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Message-ID: <361235.63039.qm@web37506.mail.mud.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org yes, I have... but, as far as I know.. to make a boolean query, we also have to make it by inputting a boolean expressions from the command line. All I want to do is making the query from textual file. I read file content, placing it in a string variable and passing it to the parser. But, in my experience, this variable is always detected as a null variable by the parser, even if the variable is containing some texts (can be displayed by system.out.printf(). This is messages that I have found from Lucene documentations: "Although Lucene provides the ability to create your own queries through its API, it also provides a rich query language through the Query Parser, a lexer which interprets a string into a Lucene Query using JavaCC. ... Before choosing to use the provided Query Parser, please consider the following: 1. If you are programmatically generating a query string and then parsing it with the query parser then you should seriously consider building your queries directly with the query API. In other words, the query parser is designed for human-entered text, not for program-generated text." That's why I am searching for this kind of API... --- On Sun, 8/3/08, Erick Erickson wrote: > From: Erick Erickson > Subject: Re: query API for program-generated query (please help..) > To: java-user@lucene.apache.org, siti_r@yahoo.com > Date: Sunday, August 3, 2008, 12:35 AM > Have you looked at BooleanQuery? > > Best > Erick > > On Fri, Aug 1, 2008 at 1:04 PM, Siti Rochimah > wrote: > > > Hi, > > > > I'm a new user for Lucene. > > > > I would like to make search-engine program with > program-generated query > > rather than user-input query. If anyone knows how to > make a query API for > > this purpose, please share the code... > > Thanks. > > > > siti_r > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > java-user-unsubscribe@lucene.apache.org > > For additional commands, e-mail: > java-user-help@lucene.apache.org > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org