Hi Robert, Thanks for submitting this fix. I will commit it tonight. But before I make a new release (ZIP file, news posting, etc.) Lets wait a bit and see that we don't find other issues.
Regards, -- George Aroush -----Original Message----- From: Robert Boulanger [mailto:[EMAIL PROTECTED] Sent: Monday, January 08, 2007 5:52 PM To: [email protected] Subject: Re: Highlighther.Net 2.0.0 "final" build 001 bug ? can anyone commit this issue ? I meant can anyone CONFIRM this issue ? sorry Robert Boulanger schrieb: > Hi George, hi folks > > can anyone commit this issue ? > Since using the new highlighter i get an exception in the code below > in line 8, saying that the dictionary already contains the key. > This happens with all queries which looks like: > > "field1:somevalue AND (fieldb:someothervalue1 fieldb:someothervalue2)" > > So the term in the brackets always searches the same field with > logical OR'S which seems to cause the problem. > Highlighter 1.5 didn't throw errors with this type of queries. > > > 1 private void HighlightDoc() > 2 { > 3 try > 4 { > 5 body = _doc.Get("body"); > 6 Analyzer Analyzer = new StandardAnalyzer(); > 7 SimpleHTMLFormatter Formatter = new > SimpleHTMLFormatter("<b><u>", "</u></b>"); > 8 Highlighter highlighter = new Highlighter(Formatter, new > QueryScorer(_query, "body")); > 9 Lucene.Net.Analysis.TokenStream tokenStream = > Analyzer.TokenStream("body", new System.IO.StringReader(body)); > 10 sample = > EncodeString(highlighter.GetBestFragments(tokenStream, body, > this._Highlights, "<br />")); > 11 } > 12 catch (Exception ex) > 13 { > 14 > 15 } > 16} > > > --Robert > > George Aroush schrieb: >> Hi folks, >> >> I just released Highlighter.Net 2.0.0 "final" build 001. Here is the >> details of the >> release: >> >> Highlighter.Net 2.0.0 build 000 "Alpha" >> - Fix: Lucene.Net.Highlight.QueryTermExtractor.GetTerms -- was >> using the wrong integrator >> - Fix: Lucene.Net.Highlight.TextFragment.ToString -- offset error >> - Issue: TestEncoding() is failing because the test code is not >> fully ported to .NET >> >> This highlighter is a port of the Java's Highlighter to .NET (from here: >> http://svn.apache.org/repos/asf/lucene/java/tags/lucene_2_0_0/contrib >> /highli >> >> ghter/) >> >> Regards, >> >> -- George Aroush >> >> > >
