node-clucene
node-clucene copied to clipboard
queries leak filehandles
https://github.com/erictj/node-clucene/blob/master/src/clucene_bindings.cpp#L586
It looks like it's opening the indexreader twice, and it never closes them... also probably shouldn't re-open one every query?
I think I'm running into problems related to this issue. The example code works fine, but if I run multiple searches in a row, clucene eventually starts throwing errors: read past EOF
. My understanding from searching around the net is that this could be a lot of things, but I ruled out index corruption, etc.
If I run var clucene = new cl.Lucene()
before each search rather than once at the top of the script, I can get in more searches before clucene starts erroring out. The error message also changes to something more helpful: Too many open files
, which is what lead me here.
Anyone have any further thoughts on this?