Re: 回复: 回复: 回复: 回复: 回复: IndexReader.open and CorruptIndexException

2013-01-25 Thread Ian Lea
chael McCandless"; > 发送时间: 2013年1月26日(星期六) 凌晨0:35 > 收件人: "java-user"; > > 主题: Re: 回复: 回复: 回复: 回复: IndexReader.open and CorruptIndexException > > > > That should work. > > Mike McCandless > > http://blog.mikemccandless.com > > > On Fri, J

回复: 回复: 回复: 回复: 回复: IndexReader.open and CorruptIndexException

2013-01-25 Thread zhoucheng2008
"java-user"; 主题: Re: 回复: 回复: 回复: 回复: IndexReader.open and CorruptIndexException That should work. Mike McCandless http://blog.mikemccandless.com On Fri, Jan 25, 2013 at 11:27 AM, zhoucheng2008 wrote: > Sorry, I meant this: > > > SearcherManager sm = new Searcher

Re: 回复: 回复: 回复: 回复: IndexReader.open and CorruptIndexException

2013-01-25 Thread Michael McCandless
- > 发件人: "Ian Lea"; > 发送时间: 2013年1月26日(星期六) 凌晨0:16 > 收件人: "java-user"; > > 主题: Re: 回复: 回复: 回复: IndexReader.open and CorruptIndexException > > > >> Is SearcherFactory the same as SearcherManager? > > No. > >> Ian mentioned a new war

回复: 回复: 回复: 回复: IndexReader.open and CorruptIndexException

2013-01-25 Thread zhoucheng2008
Sorry, I meant this: SearcherManager sm = new SearcherManager(dir, new SearcherFactory()); -- 原始邮件 -- 发件人: "Ian Lea"; 发送时间: 2013年1月26日(星期六) 凌晨0:16 收件人: "java-user"; 主题: Re: 回复: 回复: 回复: IndexReader.open and CorruptIndexException >

Re: 回复: 回复: 回复: IndexReader.open and CorruptIndexException

2013-01-25 Thread Ian Lea
:10 > 收件人: "java-user"; > > 主题: Re: 回复: 回复: IndexReader.open and CorruptIndexException > > > > You can pass null for the SearcherFactory ... then SearcherManager > will just do new IndexSearcher(reader) for you. > > Mike McCandless > > http://blog.mik

回复: 回复: 回复: IndexReader.open and CorruptIndexException

2013-01-25 Thread dyzc2010
Is SearcherFactory the same as SearcherManager? Ian mentioned a new warmer() solution. Maybe I can try that first. -- 原始邮件 -- 发件人: "Michael McCandless"; 发送时间: 2013年1月26日(星期六) 凌晨0:10 收件人: "java-user"; 主题: Re: 回复: 回复: IndexReader.open and C

Re: 回复: 回复: IndexReader.open and CorruptIndexException

2013-01-25 Thread Michael McCandless
; > 发送时间: 2013年1月25日(星期五) 晚上9:26 > 收件人: "java-user"; > > 主题: Re: 回复: IndexReader.open and CorruptIndexException > > > > Maybe here?: > > > http://blog.mikemccandless.com/2011/11/near-real-time-readers-with-lucenes.html > > Mike McCandless &g

Re: 回复: 回复: IndexReader.open and CorruptIndexException

2013-01-25 Thread Ian Lea
ichael McCandless"; > 发送时间: 2013年1月25日(星期五) 晚上9:26 > 收件人: "java-user"; > > 主题: Re: 回复: IndexReader.open and CorruptIndexException > > > > Maybe here?: > > > http://blog.mikemccandless.com/2011/11/near-real-time-readers-with-lucenes.html > >

回复: 回复: IndexReader.open and CorruptIndexException

2013-01-25 Thread zhoucheng2008
ess"; 发送时间: 2013年1月25日(星期五) 晚上9:26 收件人: "java-user"; 主题: Re: 回复: IndexReader.open and CorruptIndexException Maybe here?: http://blog.mikemccandless.com/2011/11/near-real-time-readers-with-lucenes.html Mike McCandless http://blog.mikemccandless.com On Fri, Jan 25, 2013

Re: 回复: IndexReader.open and CorruptIndexException

2013-01-25 Thread Michael McCandless
ation somewhat self-contradictory. After I read >> it, I am confused if I should close the file handlers in the finally block >> or not. I am using Java. >> > >> > >> > >> > >> > -- 原始邮件 -- >> > 发件人

Re: 回复: IndexReader.open and CorruptIndexException

2013-01-25 Thread Cheng
ion somewhat self-contradictory. After I read > it, I am confused if I should close the file handlers in the finally block > or not. I am using Java. > > > > > > > > > > ------ 原始邮件 ---------- > > 发件人: "Ian Lea"; > > 发送

Re: 回复: IndexReader.open and CorruptIndexException

2013-01-24 Thread Ian Lea
. > > > > > -- 原始邮件 -- > 发件人: "Ian Lea"; > 发送时间: 2013年1月24日(星期四) 下午5:46 > 收件人: "java-user"; > > 主题: Re: IndexReader.open and CorruptIndexException > > > > Well, raising the limits is one option but there may

回复: IndexReader.open and CorruptIndexException

2013-01-24 Thread zhoucheng2008
dlers in the finally block or not. I am using Java. -- 原始邮件 -- 发件人: "Ian Lea"; 发送时间: 2013年1月24日(星期四) 下午5:46 收件人: "java-user"; 主题: Re: IndexReader.open and CorruptIndexException Well, raising the limits is one option but there may be bet

Re: IndexReader.open and CorruptIndexException

2013-01-24 Thread Ian Lea
Well, raising the limits is one option but there may be better ones. There's an FAQ entry on this: http://wiki.apache.org/lucene-java/LuceneFAQ#Why_am_I_getting_an_IOException_that_says_.22Too_many_open_files.22.3F Take a look at org.apache.lucene.search.SearcherManager "Utility class to safely s

Re: IndexReader.open and CorruptIndexException

2013-01-24 Thread Rafał Kuć
Hello! You need to allow the user that is running Lucene to open more files. There are plenty of tutorials available on the web. Modify your /etc/security/limits.conf and if for example your user is lucene add the following (or modify if those already exists): lucene soft nofile 64000 lucene hard

Re: IndexReader.open and CorruptIndexException

2013-01-24 Thread Cheng
Here is the log: Jan 24, 2013 4:10:33 AM org.apache.tomcat.util.net.AprEndpoint$Acceptor run SEVERE: Socket accept failed org.apache.tomcat.jni.Error: 24: Too many open files at org.apache.tomcat.jni.Socket.accept(Native Method) at org.apache.tomcat.util.net.AprEndpoint$Acceptor.run(AprEndpoint.ja

Re: IndexReader.open and CorruptIndexException

2013-01-22 Thread Michael McCandless
Can you post the full stack trace of the CorruptIndexException? Mike McCandless http://blog.mikemccandless.com On Tue, Jan 22, 2013 at 8:20 AM, Cheng wrote: > Hi, > > I run a Lucene application on Tomcat. The app will try to open a Linux > directory, and sometime returns CorruptIndexException e