H2 1.2.135, Lucene 2.9.3

I am indexing with the lucene indexer. all working ok.

However, I have modified and deleted as well as adding records. I am getting some curious results at this point, where the search for "AAA" produces 850 answers, the search for "AAA BBB" produces 950, and the search for "AAA BBB CCC" produces 940.

So I think the lucene index needs re-creating. I was hoping that this:

FullTextLucene.reindex(conn);

would do it, but no: I get this error:

Exception in thread "main" java.lang.NoSuchMethodError: org.apache.lucene.index.IndexReader.indexExists(Ljava/lang/String;)Z at org.h2.fulltext.FullTextLucene.getIndexModifier(FullTextLucene.java:262)
    at org.h2.fulltext.FullTextLucene.init(FullTextLucene.java:101)
    at org.h2.fulltext.FullTextLucene.reindex(FullTextLucene.java:139)
    at com.hsi.trains.ReIndexLucene.main(ReIndexLucene.java:23)

(hadn't realized I was still using #135)

and running a 2nd time now I instead get:

Thu Apr 07 02:01:10 EDT 2011
java.sql.SQLException: Error while indexing document
at org.h2.fulltext.FullTextLucene.convertException(FullTextLucene.java:220)
    at org.h2.fulltext.FullTextLucene.init(FullTextLucene.java:103)
    at org.h2.fulltext.FullTextLucene.reindex(FullTextLucene.java:139)
    at com.hsi.trains.ReIndexLucene.main(ReIndexLucene.java:23)
Caused by: java.sql.SQLException: Error while indexing document
at org.h2.fulltext.FullTextLucene.convertException(FullTextLucene.java:220) at org.h2.fulltext.FullTextLucene.getIndexModifier(FullTextLucene.java:266)
    at org.h2.fulltext.FullTextLucene.init(FullTextLucene.java:101)
    ... 2 more
Caused by: org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: SimpleFSLock@C:\Users\MEMEME\mag-db\write.lock
    at org.apache.lucene.store.Lock.obtain(Lock.java:85)
    at org.apache.lucene.index.IndexWriter.init(IndexWriter.java:1565)
    at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:1093)
    at org.apache.lucene.index.IndexModifier.init(IndexModifier.java:176)
    at org.apache.lucene.index.IndexModifier.<init>(IndexModifier.java:142)
at org.h2.fulltext.FullTextLucene.getIndexModifier(FullTextLucene.java:264)
    ... 3 more

-----------------

I upgraded to 1.3.153, and now I get:


Thu Apr 07 02:12:29 EDT 2011
Exception in thread "main" java.lang.NoSuchFieldError: LUCENE_30
at org.h2.fulltext.FullTextLucene.getIndexAccess(FullTextLucene.java:281)
    at org.h2.fulltext.FullTextLucene.init(FullTextLucene.java:111)
    at org.h2.fulltext.FullTextLucene.reindex(FullTextLucene.java:149)
    at com.hsi.trains.ReIndexLucene.main(ReIndexLucene.java:23)


does that mean Lucene 3.0 is now the preferred indexer? (That used to not work properly at all; changing to that would seem to require a full re-indexing).

my app seems broken with 1.3.153 (presumably because I should use lucene 3.0?) -- still works ok with 1.2.140

 -- clint



--
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to