Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 15419 invoked from network); 13 Nov 2005 18:39:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 13 Nov 2005 18:39:44 -0000 Received: (qmail 113 invoked by uid 500); 13 Nov 2005 18:39:37 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 99988 invoked by uid 500); 13 Nov 2005 18:39:36 -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 99977 invoked by uid 99); 13 Nov 2005 18:39:36 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 13 Nov 2005 10:39:36 -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 [137.132.14.22] (HELO smtp.nus.edu.sg) (137.132.14.22) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 13 Nov 2005 10:39:28 -0800 Received: from [192.168.1.100] ([202.156.255.13]) by smtp.nus.edu.sg over TLS secured channel with Microsoft SMTPSVC(6.0.3790.1830); Mon, 14 Nov 2005 02:39:14 +0800 Message-ID: <43778851.4030001@nus.edu.sg> Date: Mon, 14 Nov 2005 02:39:13 +0800 From: Eugene Ezekiel User-Agent: Thunderbird 1.4 (Windows/20050908) MIME-Version: 1.0 To: java-user@lucene.apache.org Subject: Question on queryparser code from Lucene Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 13 Nov 2005 18:39:14.0506 (UTC) FILETIME=[8BDFEAA0:01C5E881] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I got this nagging problem that I can't figure out in the source code of Lucene. In the file org/apache/lucene/queryParser/QueryParser.java, there's a method called parse that returns a Query (see below): public Query parse(String query) throws ParseException { ReInit(new FastCharStream(new StringReader(query))); try { return Query(field); } I don't understand the return statement, (i) how do we return without instantiation? (ii) the Query class doesn't have a constructor that is Query(String)? Thanks. Appreciate any pointers you can give. -- Regards, Eugene --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org