[Yanel-dev] Lucene Index gets corrupt

Michael Wechner michael.wechner at wyona.com
Tue Oct 26 15:54:46 CEST 2010


Hi Balz

As discussed offline the problem is very probably the

src/impl/java/org/wyona/yarep/impl/repo/vfs/VirtualFileSystemNode.java#getNodes()

method and that it does not differentiate between splitPath enabled or not.

One needs to introduce an "unsplit method", because this method is used 
by an application (e.g. the Reindexer)
and the application should never see any splitted paths or nodes with 
splitted paths.

We need to explicitely improve the line

Path[] childPaths = getRepository().getMap().getChildren(new 
Path(this.path));

such that it differentiates between split path enabled or not and always 
returns the unsplitted paths.

I cannot tell you right now when this will be fixed, but will add a TODO 
and some notes and
maybe in turns out during course that it is actually very easy to fix.

Cheers

Michael



On 10/25/10 2:14 PM, basZero wrote:
> dear all,
>
> i often see this exception in the log when reindexing a yarep repository:
>
> 10/10/25 14:06:34 ERROR lucene.LuceneIndexer: 
> org.apache.lucene.index.CorruptIndexException: Unknown format version: -9
>
> I have two usecases where I deal with the index (indirectly):
>
> 1) Node.addNode() (in my case it is the VirtualFileSystemNode)
>
> 2) YarepUtil.index() (I use the YarepUtil in the org.wyona.yarep.util 
> package)
>
> I am not very deep into the yarep code yet, but what I have seen is 
> that the current Yarep Implementation uses a deprecated Lucene API.
> In the new API, one has to provide the Lucene Version for all 
> operations, in the old API, you don't need to provide it.
>
> I will work on this topic soon again in order to get rid of the 
> CorrupIndexException but maybe somebody has some inputs for my analysis.
>
> Cheers
> - B



More information about the Yanel-development mailing list