The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

javiherrera (4) [Avatar] Offline
#1
Hello.

It's verty frustrating to try to learn Lecene with this book and you can't compile the first example of the book :,(

The error is located in this line of Indexer.java:
Directory dir = new FSDirectory(new File(indexDir), null);

The message error:
FSDirectory(java.io.file,org.apache.lucene.store.LockFactory) has protected access in org.apache.lucene.store.FSDirectory.

Java version is: jdk_1.6.0_18


Thank you
ErikHatcher (211) [Avatar] Offline
#2
Re: First example: impossible to compile using Lucene 2.4.1, 2.4.2
The book covers Lucene 3.0 and above, so this is expected behavior.
javiherrera (4) [Avatar] Offline
#3
Re: First example: impossible to compile using Lucene 2.4.1, 2.4.2
Sorry: I meant Lucene 2.9.1 and Lucene 2.9.2

And more information: my IDE is Netbeans 6.8.


Best regards.
javiherrera (4) [Avatar] Offline
#4
Re: First example: impossible to compile using Lucene 2.9.1, 2.9.2
Oh, I'm sorry. Lucene 3.0 appeared in November, 2009, so I thought the book was about earlier versions.

Now I'm trying to evaluate LUCENE for my corporation. Do you think is it a good choice Lucene 3.0, or better some 2.9 versions?


Best regards.
ErikHatcher (211) [Avatar] Offline
#5
Re: First example: impossible to compile using Lucene 2.9.1, 2.9.2
Personally, I think Solr (1.4) is the best thing you can evaluate for your company smilie It's Lucene, but with all the infrastructure that you'd end up writing yourself on top of Lucene otherwise.
javiherrera (4) [Avatar] Offline
#6
Re: First example: impossible to compile using Lucene 2.9.1, 2.9.2
> Personally, I think Solr (1.4) is the best thing you
> can evaluate for your company smilie It's Lucene, but
> with all the infrastructure that you'd end up writing
> yourself on top of Lucene otherwise.
Thank you very much smilie