NLucene is great - when it works.
Unfortunately, it pretty consistently crashes with a
variety of different exceptions when searching text
with a '*' in the search pattern, and various special
characters such as '-' in the text that is indexed. I
hope this can be fixed, because otherwise, NLucene is
really fantastic.
For example, searching for "hcil-*" in my dataset
results in this call stack:
nlucene.dll!DotnetPark.NLucene.QueryParser.TokenList.Peek()
Line 84 + 0xd bytes C#
nlucene.dll!DotnetPark.NLucene.QueryParser.QueryParser.MatchQuery(string
field = "subject") Line 205 + 0xe bytes C#
nlucene.dll!DotnetPark.NLucene.QueryParser.QueryParser.Parse(System.IO.TextReader
reader = {System.IO.StringReader}) Line 146 + 0xb bytes C#
nlucene.dll!DotnetPark.NLucene.QueryParser.QueryParser.Parse(string
query = "subject:hcil-") Line 133 + 0x21 bytes C#
nlucene.dll!DotnetPark.NLucene.QueryParser.QueryParser.Parse(string
query = "subject:hcil-", string field = "subject",
DotnetPark.NLucene.Analysis.Analyzer analyzer =
{DotnetPark.NLucene.Analysis.SimpleAnalyzer}) Line 123
+ 0xd bytes C#
Here is another example with a different crash point
when I searched for 'k*':
>
nlucene.dll!DotnetPark.NLucene.Index.FieldInfos.FieldInfo(int
fieldNumber = 104) Line 143 + 0xd bytes C#
nlucene.dll!DotnetPark.NLucene.Index.FieldInfos.FieldName(int
fieldNumber = 104) Line 138 + 0xb bytes C#
nlucene.dll!DotnetPark.NLucene.Index.SegmentTermEnum.ReadTerm()
Line 182 + 0x1d bytes C#
nlucene.dll!DotnetPark.NLucene.Index.SegmentTermEnum.Next()
Line 161 + 0xb bytes C#
nlucene.dll!DotnetPark.NLucene.Index.TermInfosReader.ScanEnum(DotnetPark.NLucene.Index.Term
term = {DotnetPark.NLucene.Index.Term}) Line 184 +
0x30 bytes C#
nlucene.dll!DotnetPark.NLucene.Index.TermInfosReader.Get(DotnetPark.NLucene.Index.Term
term = {DotnetPark.NLucene.Index.Term}) Line 172 +
0xc bytes C#
nlucene.dll!DotnetPark.NLucene.Index.SegmentReader.DocFreq(DotnetPark.NLucene.Index.Term
t = {DotnetPark.NLucene.Index.Term}) Line 256 + 0x10
bytes C#
nlucene.dll!DotnetPark.NLucene.Search.IndexSearcher.DocFreq(DotnetPark.NLucene.Index.Term
term = {DotnetPark.NLucene.Index.Term}) Line 102 +
0xd bytes C#
nlucene.dll!DotnetPark.NLucene.Search.Similarity.Idf(DotnetPark.NLucene.Index.Term
term = {DotnetPark.NLucene.Index.Term},
DotnetPark.NLucene.Search.Searcher searcher =
{DotnetPark.NLucene.Search.IndexSearcher}) Line 114 +
0xa bytes C#
nlucene.dll!DotnetPark.NLucene.Search.TermQuery.SumOfSquaredWeights(DotnetPark.NLucene.Search.Searcher
searcher = {DotnetPark.NLucene.Search.IndexSearcher})
Line 83 + 0xd bytes C#
nlucene.dll!DotnetPark.NLucene.Search.BooleanQuery.SumOfSquaredWeights(DotnetPark.NLucene.Search.Searcher
searcher = {DotnetPark.NLucene.Search.IndexSearcher})
Line 121 + 0x1d bytes C#
nlucene.dll!DotnetPark.NLucene.Search.PrefixQuery.SumOfSquaredWeights(DotnetPark.NLucene.Search.Searcher
searcher = {DotnetPark.NLucene.Search.IndexSearcher})
Line 98 + 0x13 bytes C#
nlucene.dll!DotnetPark.NLucene.Search.BooleanQuery.SumOfSquaredWeights(DotnetPark.NLucene.Search.Searcher
searcher = {DotnetPark.NLucene.Search.IndexSearcher})
Line 121 + 0x1d bytes C#
nlucene.dll!DotnetPark.NLucene.Search.Query.Scorer(DotnetPark.NLucene.Search.Query
query = {DotnetPark.NLucene.Search.BooleanQuery},
DotnetPark.NLucene.Search.Searcher searcher =
{DotnetPark.NLucene.Search.IndexSearcher},
DotnetPark.NLucene.Index.IndexReader reader =
{DotnetPark.NLucene.Index.SegmentReader}) Line 99 +
0xa bytes C#
nlucene.dll!DotnetPark.NLucene.Search.IndexSearcher.Search(DotnetPark.NLucene.Search.Query
query = {DotnetPark.NLucene.Search.BooleanQuery},
DotnetPark.NLucene.Search.Filter filter = <undefined
value>, int nDocs = 100) Line 169 + 0xe bytes C#
nlucene.dll!DotnetPark.NLucene.Search.Hits.GetMoreDocs(int
min = 50) Line 165 + 0x1d bytes C#
nlucene.dll!DotnetPark.NLucene.Search.Hits.Hits(DotnetPark.NLucene.Search.Searcher
s = {DotnetPark.NLucene.Search.IndexSearcher},
DotnetPark.NLucene.Search.Query q =
{DotnetPark.NLucene.Search.BooleanQuery},
DotnetPark.NLucene.Search.Filter f = <undefined value>)
Line 85 C#
nlucene.dll!DotnetPark.NLucene.Search.Searcher.Search(DotnetPark.NLucene.Search.Query
query = {DotnetPark.NLucene.Search.BooleanQuery},
DotnetPark.NLucene.Search.Filter filter = <undefined
value>) Line 82 + 0x1b bytes C#
nlucene.dll!DotnetPark.NLucene.Search.Searcher.Search(DotnetPark.NLucene.Search.Query
query = {DotnetPark.NLucene.Search.BooleanQuery}) Line
73 + 0xd bytes C#
Logged In: YES
user_id=542288
Thanks,
Definetely I will find out what has happend and fix in new
release.