lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eugene Ezekiel <u0200...@nus.edu.sg>
Subject Question on queryparser code from Lucene
Date Sun, 13 Nov 2005 18:39:13 GMT
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


Mime
View raw message