Itamar,

Thanks for all of your hard work on this (not just to you, but to all whom are 
involved).

After this announcement, I began work on porting BoboBrowse.NET 4.0.2 (the 
latest official release) faceted search engine to see if it will work with 
Lucene.Net 4.8.0. bobo-browse 4.0.2 was based on Lucene 4.3.0, so I am hopeful 
it will work with 4.8.0.

Anyway, long story short I have discovered a bug that existed in Lucene.NET 
3.0.3 has not been squashed. The test setup for most of the BoboBrowse.NET unit 
tests depends on a TokenStream derived class, and when building an index with 
this class it is failing.

I have created a branch here to outline the problem and create a working sample 
of the bug: 
https://github.com/NightOwl888/BoboBrowse.Net/blob/4.0.2-lucene-attr-issue/src/BoboBrowse.Net/BoboBrowse.Tests/BoboTestCase.cs#L128-L133


If I try to run it with the original lines (130-133), I get an exception.

System.ArgumentException : AddAttribute() only accepts an interface that 
extends IAttribute, but Lucene.Net.Analysis.Tokenattributes.PayloadAttribute 
does not fulfil this contract.
Result StackTrace:      
at Lucene.Net.Util.AttributeSource.AddAttribute[T]()
at BoboBrowse.Net.BoboTestCase.MetaSizeTokenStream..ctor(Term term, Int32 size) 
in 
f:\Projects\BoboBrowse.Net\src\BoboBrowse.Net\BoboBrowse.Tests\BoboTestCase.cs:line
 133
at BoboBrowse.Net.BoboTestCase.BuildMetaSizePayloadField(Term term, Int32 size) 
in 
f:\Projects\BoboBrowse.Net\src\BoboBrowse.Net\BoboBrowse.Tests\BoboTestCase.cs:line
 178
at BoboBrowse.Net.BoboTestCase.BuildData() in 
f:\Projects\BoboBrowse.Net\src\BoboBrowse.Net\BoboBrowse.Tests\BoboTestCase.cs:line
 195
at BoboBrowse.Net.BoboTestCase.CreateIndex() in 
f:\Projects\BoboBrowse.Net\src\BoboBrowse.Net\BoboBrowse.Tests\BoboTestCase.cs:line
 439
at BoboBrowse.Net.BoboTestCase.Init() in 
f:\Projects\BoboBrowse.Net\src\BoboBrowse.Net\BoboBrowse.Tests\BoboTestCase.cs:line
 86

I checked the source and the PayloadAttribute definitely implements IAttribute, 
so apparently the code that checks for the interface is broken.

This was also broken in Lucene.Net 3.0.3 in a similar way. However, I was able 
to work around the problem by calling AddAttributeImpl instead of 
AddAttribute<T> (lines 137-142). So far this also seems to be working in 
Lucene.Net 4.8.0.

Anyway, I would appreciate if someone can take a look at this.

In addition, I sure hope you don't plan on releasing without the QueryParser 
and StandardAnalyzer classes!! These are referenced from BoboBrowse, and for 
now I have built stubs to make the project compile.


Also, if anyone is interested in an alternative faceted search implementation 
than the built-in one, I could use assistance:

1. Getting unit tests to pass
2. Making the API consistent with the Lucene.Net API (properties vs methods)
3. Cleaning up the Close vs Dispose issues, also which should be similar to 
Lucene.Net
4. Reporting bugs once it is stable enough to identify them

Now accepting pull requests on the 4.0.2 branch. 
https://github.com/NightOwl888/BoboBrowse.Net/tree/4.0.2 Do note that the 
ReadMe has not yet been updated to reflect the new version.

Thanks,
NightOwl888


-----Original Message-----
From: [email protected] [mailto:[email protected]] On 
Behalf Of Itamar Syn-Hershko
Sent: Thursday, July 7, 2016 11:08 PM
Subject: Lucene.NET 4.8 is now in Beta - and we need your help!

Hi folks,

I just posted this -
http://code972.com/blog/2016/07/98-lucene-net-4-8-is-in-beta-and-we-need-your-help
- with the latest details and instructions on the upcoming Lucene.NET release.

We would love to see more involvement from anyone interested in the project.

Cheers,

--

Itamar Syn-Hershko
http://code972.com | @synhershko <https://twitter.com/synhershko> Freelance 
Developer & Consultant Lucene.NET committer and PMC member

Reply via email to