I have the following code, where I pass a search value and an analyzer:
private static Query Query(string searchValue, StandardAnalyzer analyzer)
{
var queryParser = new QueryParser(Version.LUCENE_30, "Data", analyzer);
return queryParser.Parse(searchValue);
}
The exception is being thrown in the Parse method.
The results are being returned correctly, so everything works fine; it's just that annoying exception. Am I suppose to ignore it? Is it a default behaviour of Lucene.Net? I'm using version 3.0.3.
Found this post before, however none of the points mentioned in the answer apply. The index is not corrupted - checked in Luke.Net and by Lucene's CheckIndex class. There is no problem with the write permission, as I can write to the index and nothing else is using the index files.