Deleting document from Lucene indexing not working in version 34

2017-02-22 Thread har...@oneit.com.au
Hi All, I am using lucene version 3.4.0 and StandardAnalyzer. I am trying to delete the document using document id from indexing but it seems not working. I tried many diff ways as follow: IndexReader.deleteDocuments(new Term("documentDocId", "LuceneObj:215487")) IndexWriter.deleteDocuments(new

Re: “Too many open files" error hit when I run my Lucene 3.0.3 application on Java 8

2017-02-22 Thread Uwe Schindler
The garbage collector in Java 8 may have different behavior. This may cause issues if you have buggy code that does not close indexreaders open in parallel to indexing. If it relies on Garbage Collector to close accidentally open files, that won't work anymore on Java 8. The reason for this migh

Re: “Too many open files" error hit when I run my Lucene 3.0.3 application on Java 8

2017-02-22 Thread Torsten Krah
What does lsof tell - which handles are open and which are unexpected or suspicious? Am 22.02.2017 5:27 nachm. schrieb "Leonid Bolshinsky" : > No code changes between running in Java 6 and Java 8. The same code still > runs successfully with Java 6 while is failing with Java 8. > > On Feb 22, 201

Re: “Too many open files" error hit when I run my Lucene 3.0.3 application on Java 8

2017-02-22 Thread Leonid Bolshinsky
No code changes between running in Java 6 and Java 8. The same code still runs successfully with Java 6 while is failing with Java 8. On Feb 22, 2017 5:52 PM, "Frederik Van Hoyweghen" < frederik.vanhoyweg...@chapoo.com> wrote: Did you make any changes to your code between running on java 6 and 8?

Re: “Too many open files" error hit when I run my Lucene 3.0.3 application on Java 8

2017-02-22 Thread Frederik Van Hoyweghen
Did you make any changes to your code between running on java 6 and 8? The java file API has changed considerably since java 8. If you -have- rewritten some of the file handling code in your indexing process, make sure to explicitly close the streams you create, or use the (since java 7) try-wi

“Too many open files" error hit when I run my Lucene 3.0.3 application on Java 8

2017-02-22 Thread Leonid Bolshinsky
I have a search engine based on Lucene 3.0.3 and I can't change the Lucene version for reasons that are out of scope of this question. Now I have a requirement to move from Java 6 to Java 8, however when I run the indexing using Java 8 JVM, I hit "Too many open files issue" as below: java.io.FileN