lucenenet-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Itamar Syn-Hershko <ita...@code972.com>
Subject Re: Lucene.NET 4.8 is now in Beta - and we need your help!
Date Thu, 21 Jul 2016 21:49:30 GMT
Hi Shad,

Thanks for sharing this! BoboBrowse seems to be discontinued, no? worth
pointing you at
https://github.com/apache/lucenenet/tree/master/src/Lucene.Net.Facet which
is fully ported but with some failing tests - recent Lucene released
support advanced faceting directly from the core (via the Facet subproject)
so no external libraries are really needed for that. Maybe that's why
BoboBrowse was never upgraded to 4.8.x.

With regards to the failure you describe, calling payloadAttr =
base.AddAttribute<IPayloadAttribute>(); will work (note the use of the
interface as the type parameter).

I don't remember why we did it this way, and will review it once again soon
- but this works just fine when used like this :) I think it was done this
way because of some inheritance related differences between Java and .NET,
but I'll get back to you on this soon.

The QueryParser and Analyzer classes are now in subprojects - that are
still in the process of being ported - and any help there will be greatly
appreciated.

Cheers,

--

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

On Wed, Jul 20, 2016 at 4:46 AM, Shad Storhaug <shad@shadstorhaug.com>
wrote:

> 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: itamar.synhershko@gmail.com [mailto:itamar.synhershko@gmail.com] 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
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message