If you use Lucene 2.9 (you mentioned this), you can now use NumericRangeQuery and NumericField for fast range queries. The only problem is, that QueryParser does not support it (because we have no schema support and so query parser has no idea which type the field is -- but the new one maybe coming in contrib can be configured to do it for specific field names). The queries are very fast, you must build them creating Query instances via hand. But in most cases, for numeric queries, the user gets separate input fields (like the Latitude/Longitude/date bounding box input lines on http://www.pangaea.de/advanced/advsearch.php) and you can then create a BooleanQuery, add the numeric contraints to it and also add a parsed query.
----- Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: u...@thetaphi.de > -----Original Message----- > From: MilleBii [mailto:mille...@gmail.com] > Sent: Wednesday, July 29, 2009 2:33 PM > To: java-user@lucene.apache.org; paul_t...@fastmail.fm > Subject: RE: How do you Parse a query to convert numbers to strings > > It is explained in the book Lucene in Action. > So you just need to do some padding on numbers and do a rangeQuery... > Lucene implements a lexicographic comparison > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org