API to get the matched lines in a file?

2008-10-26 Thread Agrawal, Aashish (IT)
Is there any API in lucene which gives you matched lines or offiset in a file to first instance of matched pattern? thanks, Aashish Agrawal NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive

Neeraj Gupta is out of the office.

2008-10-26 Thread Neeraj Gupta
Regarding your message: RE: example on RegexQuery I will be out of the office starting 27-Oct-2008 and will not return until 03-Nov-2008. I will respond to your message when I return. The information contained in this e-mail and any accompanying documents may contain information that is c

RE: example on RegexQuery

2008-10-26 Thread Agrawal, Aashish (IT)
Hi Steven thanks for pointing to the example of RegexQuery. I have a simple code snippet which is not working, not sure if I am using it incorrectly. RegexQuery query = new RegexQuery (new Term (field, line)); query.setRegexImplementation(new JavaUtilRegexCapabilities());

Re: How to restore corrupted index

2008-10-26 Thread Chris Hostetter
: i use SimpleFSLockFactory and optimized opened IndexWriter, but i use api to : forcefully removing the lock file. : this missing file, just occurs in sometimes not always?? forcibly removing hte lock file isn't something that should be done in a typical situation ... if the lock file is there,

Re: Lucene Input/Output error

2008-10-26 Thread Michael McCandless
JulieSoko wrote: I'm using Linux... running out of file descriptors... I didn't think of that! I will check on Monday... Try running "lsof" and count how many files are held open by the JRE process. I forgot to mention that I am using the Lucene 2.3.1 version. Not sure if that makes

Re: Lucene Input/Output error

2008-10-26 Thread Michael McCandless
That would definitely cause problems for any searches still in flight on the old IndexReader (though I'm not certain that generic Input/ output error IOException is what would be thrown). You can use the IndexReader's incRef/decRef methods to ensure the reader stays open for all in flight