SourceForge.net Logo
Main Overview Wiki Issues Forum Build Fisheye
Issue Details (XML | Word | Printable)

Key: CMP-556
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Shay Banon
Reporter: Hani Suleiman
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Compass

Error when trying to reindex with spellchecking enabled

Created: 27/Feb/08 07:54 PM   Updated: 29/Feb/08 04:13 AM
Component/s: Compass::Core
Affects Version/s: None
Fix Version/s: 2.0.0 M3


 Description  « Hide
I have a bunch of entities indexed, and get this when I try to reindex. Using svn head from about 5 mins ago.

java.lang.NullPointerException
at org.compass.core.lucene.engine.spellcheck.DefaultLuceneSpellCheckManager.close(DefaultLuceneSpellCheckManager.java:208)
at org.compass.core.lucene.engine.spellcheck.DefaultLuceneSpellCheckManager.close(DefaultLuceneSpellCheckManager.java:200)
at org.compass.core.lucene.engine.LuceneSearchEngineFactory.close(LuceneSearchEngineFactory.java:97)
at org.compass.core.impl.DefaultCompass.close(DefaultCompass.java:207)
at org.compass.gps.impl.SingleCompassGps.doIndex(SingleCompassGps.java:136)
at org.compass.gps.impl.AbstractCompassGps.index(AbstractCompassGps.java:150)



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Hani Suleiman added a comment - 27/Feb/08 08:07 PM
This looks like its because of reindexing first cloning the existing index. The clone at this point does not have any subindexes, and the close operation is called on the clone's spellchecker, which in turn does not have any subindexes.

Shay Banon added a comment - 28/Feb/08 02:29 AM
Yea, wrong place to do the initialization of the locks and version tables. It should work now and I have added a test with Hibernate Gps and spell check enabled (I was sure I added one). Tell me if things work well and I will close this.

Hani Suleiman added a comment - 28/Feb/08 05:22 AM
That fixes the initial error, but the next error is now:

rg.compass.core.engine.SearchEngineException: Failed to open spell index searcher for sub index [audititem]; nested exception is java.io.FileNotFoundException: /Users/hani/orion/spellcheck/audititem/_0.fdt (No such file or directory)
java.io.FileNotFoundException: /Users/hani/orion/spellcheck/audititem/_0.fdt (No such file or directory)
at java.io.RandomAccessFile.open(Native Method)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:212)
at org.apache.lucene.store.FSDirectory$FSIndexInput$Descriptor.<init>(FSDirectory.java:506)
at org.apache.lucene.store.FSDirectory$FSIndexInput.<init>(FSDirectory.java:536)
at org.apache.lucene.store.FSDirectory.openInput(FSDirectory.java:445)
at org.apache.lucene.index.FieldsReader.<init>(FieldsReader.java:75)
at org.apache.lucene.index.SegmentReader.initialize(SegmentReader.java:308)
at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:262)
at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:230)
at org.apache.lucene.index.DirectoryIndexReader$1.doBody(DirectoryIndexReader.java:73)
at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:636)
at org.apache.lucene.index.DirectoryIndexReader.open(DirectoryIndexReader.java:63)
at org.apache.lucene.index.IndexReader.open(IndexReader.java:209)
at org.apache.lucene.index.IndexReader.open(IndexReader.java:192)
at org.compass.core.lucene.engine.spellcheck.DefaultLuceneSpellCheckManager.refresh(DefaultLuceneSpellCheckManager.java:272)
at org.compass.core.lucene.engine.spellcheck.DefaultLuceneSpellCheckManager.closeAndRefresh(DefaultLuceneSpellCheckManager.java:506)
at org.compass.core.lucene.engine.spellcheck.DefaultLuceneSpellCheckManager.start(DefaultLuceneSpellCheckManager.java:166)
at org.compass.core.lucene.engine.LuceneSearchEngineFactory.start(LuceneSearchEngineFactory.java:164)
at org.compass.core.impl.DefaultCompass.start(DefaultCompass.java:192)

At a random guess, I think its because cloning the spellchecker index doesnt seem to work quite the same was as cloning the regular index. Usually a 'gpsindex' directory is created for the new copy of the main index, but the spellcheck directory doesnt seem to have its own temporary work index that's created and then renamed.


Hani Suleiman added a comment - 28/Feb/08 10:57 AM
Works now, thanks!