lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mag Gam" <magaw...@gmail.com>
Subject Re: Query parser.parse (line);
Date Thu, 24 Aug 2006 01:22:33 GMT
Very good advice!

With the previous code you gave me, I was able to get everything for 2.0!
good call!



On 8/23/06, Erik Hatcher <erik@ehatchersolutions.com> wrote:
>
>
> On Aug 23, 2006, at 8:45 PM, Mag Gam wrote:
> > I am looking at this page
> > http://today.java.net/pub/a/today/2003/11/07/QueryParserRules.html
> >
> > Any chance there is a new version for 2.0? Or are there any 2.0
> > examples
> > (other than the stock example)?
>
> No, that article has not been updated for the 2.0 API.
>
> The main things that changed from the version of Lucene used in that
> article are:
>
>         * QueryParser must now be instantiated and the instance .parse()
> must be used instead of the previous QueryParser.parse() static method.
>
>         * BooleanQuery.add() now uses the Occur enumeration rather than
> the
> boolean flags.
>
> You can reference the javadocs for the 2.0 QueryParser and
> BooleanQuery APIs here: <http://lucene.apache.org/java/docs/api/
> index.html> and that will help you resolve any compilation issues you
> get when using code examples for previous versions.
>
> Given the nature of your questions I recommend you download Lucene
> 1.9 and use it for the time being (at least for the javadocs to see
> the deprecation messages with upgrade details), while you become
> familiar with Lucene.  All the examples you'll find online and in
> Lucene in Action are 1.9 compatible, and the main change between 1.9
> and 2.0 is that all the deprecated methods have been removed.  Once
> you have a working system and understand Lucene's API in more detail,
> you can tidy up any deprecation warnings you get and upgrade to 2.0.
>
>         Erik
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message