No.  Certainly not for lucene 3.0.3 on linux anyway.

As someone has already suggested, run lsof to see which files your
process has open.  Maybe you aren't closing the source documents.


--
Ian.


On Wed, Mar 23, 2011 at 10:46 AM, Vo Nhu Tuan <vonhut...@gmail.com> wrote:
> I have already used compound file and closed everything I can.
>
> Would this line cause problem when called many times?
> IndexWriter writer = new IndexWriter(FSDirectory.open(indexFile), new 
> StandardAnalyzer(Version.LUCENE_30), true, 
> IndexWriter.MaxFieldLength.LIMITED);
>
> This FSDirectory.open() is the only thing that I didn't close.
>
> Tuan
>
> On 23-Mar-2011, at 5:53 PM, Li Li wrote:
>
>> and also try using compound files (cfs)
>>
>> 2011/3/23 Vo Nhu Tuan <vonhut...@gmail.com>:
>>> Hi,
>>>
>>> Can someone help me with this problem please? I got these when running my 
>>> program:
>>>
>>> java.io.FileNotFoundException: 
>>> /Users/vonhutuan/Documents/workspace/InformationExtractor/index_wordlist/_i82.frq
>>>  (Too many open files)
>>>        at java.io.RandomAccessFile.open(Native Method)
>>>        at java.io.RandomAccessFile.<init>(RandomAccessFile.java:212)
>>>        at 
>>> org.apache.lucene.store.SimpleFSDirectory$SimpleFSIndexOutput.<init>(SimpleFSDirectory.java:180)
>>>        at 
>>> org.apache.lucene.store.NIOFSDirectory.createOutput(NIOFSDirectory.java:85)
>>>        at 
>>> org.apache.lucene.index.FormatPostingsDocsWriter.<init>(FormatPostingsDocsWriter.java:47)
>>>        at 
>>> org.apache.lucene.index.FormatPostingsTermsWriter.<init>(FormatPostingsTermsWriter.java:33)
>>>        at 
>>> org.apache.lucene.index.FormatPostingsFieldsWriter.<init>(FormatPostingsFieldsWriter.java:59)
>>>        at 
>>> org.apache.lucene.index.FreqProxTermsWriter.flush(FreqProxTermsWriter.java:94)
>>>        at org.apache.lucene.index.TermsHash.flush(TermsHash.java:156)
>>>        at org.apache.lucene.index.DocInverter.flush(DocInverter.java:72)
>>>        at 
>>> org.apache.lucene.index.DocFieldProcessor.flush(DocFieldProcessor.java:64)
>>>        at 
>>> org.apache.lucene.index.DocumentsWriter.flush(DocumentsWriter.java:629)
>>>        at 
>>> org.apache.lucene.index.IndexWriter.doFlushInternal(IndexWriter.java:3694)
>>>        at org.apache.lucene.index.IndexWriter.doFlush(IndexWriter.java:3595)
>>>        at org.apache.lucene.index.IndexWriter.flush(IndexWriter.java:3585)
>>>        at 
>>> org.apache.lucene.index.IndexWriter.optimize(IndexWriter.java:2338)
>>>        at 
>>> org.apache.lucene.index.IndexWriter.optimize(IndexWriter.java:2316)
>>>        at 
>>> org.apache.lucene.index.IndexWriter.optimize(IndexWriter.java:2286)
>>>        at patterngenerator.TextMatcher.indexText(TextMatcher.java:86)
>>>        at patterngenerator.TextMatcher.<init>(TextMatcher.java:60)
>>>        at patterngenerator.PatternGenerator.<init>(PatternGenerator.java:53)
>>>        at Test2.main(Test2.java:64)
>>>
>>> What it was doing is:
>>>        writer.optimize();
>>> where writer was an instance of IndexWriter.
>>>
>>> As of my program, it indexes many set of documents independently, but the 
>>> index files are store under the same directory. Which means that the index 
>>> files get overwritten when I index a new set of documents.
>>>
>>> Tuan
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
>> For additional commands, e-mail: java-user-h...@lucene.apache.org
>>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to