创建IndexSearcher抛出IOException读取过EOF [英] Create IndexSearcher is throwing IOException read past EOF

查看:180
本文介绍了创建IndexSearcher抛出IOException读取过EOF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试创建一个新的IndexSearcher(fsDir)类的对象时,它抛出 IOException读取超过EOF 。搜索索引不是基于RAM的,它是基于NFS的(使用 FSDirectory lucene类)。

When I try to to create an object of new IndexSearcher(fsDir) class it is throwing IOException read past EOF. The search index is not RAM based, it is NFS based (used FSDirectory lucene class).

我google了得到了这个

I googled and got that this one

那里不是权限问题,也没有锁定,我查看了 lockhunter

There is not permission issue, neither locked, I checked with lockhunter

所以必须有写权限,没有人使用该目录。

So there must be write permission and none is using that directory.

过去2-3个月它一直在工作。昨天突然停止工作,文件夹中的所有索引文件。

It was working the past 2-3 months. Yesterday suddenly stopped working, all indexed files in the folder.

还有什么可能导致此异常?有没有像索引是2-3个月(某个时期),然后它过期并给出这个例外?

What else may cause to this exception? Is there something like if index is 2-3 month old (some period), then it gets expired and gives this exception?

推荐答案

我得到了答案,花了很多时间,它会给出异常(IOException读取过去的EOF):

I got the answer, spending a lot of time on it, It will give that exception(IOException read past EOF):

If Directory does not give write permission
If someone else is using(locked)
If some segment is corrupted

对于我的情况它已损坏:(。但Exception没有说明这一点(可以告诉一些 FIleCurroptedException )。这可能对某人有所帮助否则。

For my case It was corrupted :(. But Exception does not say anything about this(Could tell some FIleCurroptedException). This is may help to someone else.

这篇关于创建IndexSearcher抛出IOException读取过EOF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆