lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Miller <markrmil...@gmail.com>
Subject Re: Displaying and highlighting results from a Wild Card and Fuzzy search using Lucene in Java
Date Tue, 17 Jun 2008 20:21:01 GMT
Chris Hostetter wrote:
> : why your are getting that error...that is the type of error you would get if
> : you were trying to use IndexReaders Protected constructor outside the index
> : package...but you are correctly using the static open call...
>
> not quite...
>
> : >         IndexReader	ir = new IndexReader().open(fsDir);
>
> ...that should be...
>
>             IndexReader ir = IndexReader.open(fsDir);
>
> ..correct?
>
>
>
>
> -Hoss
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>   
I am sadly lost without my syntax Highlighting :) Nice catch.

You need to use the static method rather than try and instantiate a new 
IndexReader and then call the static method on the instantiated object.

---------------------------------------------------------------------
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