lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roethinger, Alexander" <aroethin...@affili.net>
Subject AW: QueryParser package on NuGet
Date Thu, 03 Nov 2016 14:01:14 GMT
Hi Shad,

yes, that's probably the best way to go, also considering that code-compatibility for a port
is essential, which I totally understand (even if it means porting potential downsides).

I built a derived class with the overridden method which works just fine.
(But still wouldn't mind seeing the fix in the original code if it's justifiable...).

Many thanks for your support!

Regards
Alexander


-----Ursprüngliche Nachricht-----
Von: Shad Storhaug [mailto:shad@shadstorhaug.com] 
Gesendet: Donnerstag, 3. November 2016 14:44
An: Roethinger, Alexander <aroethinger@affili.net>
Cc: dev@lucenenet.apache.org; itamar.synhershko@gmail.com; Itamar Syn-Hershko <itamar@code972.com>
Betreff: RE: QueryParser package on NuGet

Alexander,

BTW - I noticed the method is protected virtual. Perhaps there is a way to override it and
change the behavior?

Thanks,
Shad Storhaug (NightOwl888)

-----Original Message-----
From: Shad Storhaug
Sent: Thursday, November 3, 2016 8:39 PM
To: 'aroethinger@affili.net'
Cc: dev@lucenenet.apache.org
Subject: RE: QueryParser package on NuGet

Alexander,

Not sure that is a wise idea, since that is exactly how it was done in Lucene 4.8.0:

https://github.com/apache/lucene-solr/blob/releases/lucene-solr/4.8.0/lucene/suggest/src/java/org/apache/lucene/search/suggest/analyzing/AnalyzingInfixSuggester.java#L533-538

However, the master branch (Lucene version 6.2.1) seems to have updated it to your liking:

https://github.com/apache/lucene-solr/blob/master/lucene/suggest/src/java/org/apache/lucene/search/suggest/analyzing/AnalyzingInfixSuggester.java#L674-678


@Itamar, what are your thoughts on this? There is a Highlighter package that has not been
ported yet, but I am not sure it is in any way relevant to this.


Thanks,
Shad Storhaug (NightOwl888)


-----Original Message-----
From: Roethinger, Alexander [mailto:aroethinger@affili.net]
Sent: Thursday, November 3, 2016 8:15 PM
To: dev@lucenenet.apache.org
Subject: AW: QueryParser package on NuGet

Hi Wyatt,

thanks for the prompt reply and for providing a package!

BTW regarding AnalyzingInfixSuggester:
This suggester supports highlighting, which is a nice feature.
Unfortunately, highlighting is applied to both the Key and HighlightKey values in LookupResult.

See code:

if (doHighlight)
                {
                    object highlightKey = Highlight(text, matchedTokens, prefixToken);
                    result = new LookupResult(highlightKey.ToString(), highlightKey, score,
payload, contexts);
                }
                else
                {
                    result = new LookupResult(text, score, payload, contexts);
                }

This behavior is disadvantageous when using the results in JQUERY autocomplete because the
actual value that should be returned from autocomplete should be without highlighting (aka
the markup-tag for highlighting). autocomplete supports separate Label and Value fields to
accommodate for this.

My suggestion would be to set the Key value to the non-highlighted text as follows:

object highlightKey = Highlight(text, matchedTokens, prefixToken); result = new LookupResult(text,
highlightKey, score, payload, contexts);


What do you think?

Kind regards
Alexander




-----Ursprüngliche Nachricht-----
Von: Wyatt Barnett [mailto:wyatt.barnett@gmail.com]
Gesendet: Donnerstag, 3. November 2016 13:39
An: dev@lucenenet.apache.org
Betreff: Re: QueryParser package on NuGet

Good catch Andrew -- I just added Misc to the build, it should be out there in 2.5 hours or
so after the build servers do their thing.

Looking at the code, it seems like a lot of things reference the Lucene.Net.Util.Fsc namespace
which is in the misc project for some reason
-- 127 to be exact. Does it make sense to move those functions to the core?



On Thu, Nov 3, 2016 at 8:16 AM Roethinger, Alexander <aroethinger@affili.net>
wrote:

> Hi Wyatt,
>
> a noticed your comment on the need for Lucene.Net.Misc in your mail below.
> It seems that AnalyzingInfixSuggester relies on Lucene.Net.Misc to load.
>
> When executing the following code:
>
> Lucene.Net.Store.Directory dir = FSDirectory.Open(path); 
> StandardAnalyzer analyzer = new StandardAnalyzer(matchVersion); 
> AnalyzingInfixSuggester suggester = new 
> AnalyzingInfixSuggester(matchVersion, dir, analyzer);
>
>
> I get an "File or Assembly not found" exception:
> {"Die Datei oder Assembly \"Lucene.Net.Misc, Version=4.8.0.697, 
> Culture=neutral, PublicKeyToken=null\" oder eine Abhängigkeit davon 
> wurde nicht gefunden. Das System kann die angegebene Datei nicht 
> finden.":"Lucene.Net.Misc, Version=4.8.0.697, Culture=neutral, 
> PublicKeyToken=null"}
>
> To get around this, I compiled Lucene.Net.Misc from Lucene-Master and 
> copied the DLL to my application directory and it works. But it would 
> be nice to see an official package for Lucene.Net.Misc.
>
>
> Thanks and kind regards
> Alexander
>
>
> -----Ursprüngliche Nachricht-----
> Von: Wyatt Barnett [mailto:wyatt.barnett@gmail.com]
> Gesendet: Dienstag, 1. November 2016 03:29
> An: Itamar Syn-Hershko <itamar@code972.com>; 
> user@lucenenet.apache.org; dev@lucenenet.apache.org
> Betreff: Re: QueryParser package on NuGet
>
> Sorry for the confusion -- the nuget pack doesn't automatically pick 
> up any project, we need to add it to a list in the nightly project.
> Anyhow, projects have been added and the nightly is running now. We 
> should see the packages out there in the next few hours barring 
> another build timeout or me fat fingering things.
>
> While I was at it I added Memory, Analysis.Stempel and Suggest both as 
> dedicated projects with their own builds but also to the nuget package 
> generation.
>
> I looked at the other projects in the .sln as well. Misc just didn't 
> seem to have anything one would want as an independent package, 
> grouping seemed more ready but it doesn't have a test project. I can 
> add them -- or any others -- when ready, just ping me.
>
> On Sat, Oct 29, 2016 at 2:47 PM Itamar Syn-Hershko 
> <itamar@code972.com>
> wrote:
>
> > A better link: https://www.myget.org/gallery/lucene-net
> >
> > --
> >
> > Itamar Syn-Hershko
> > http://code972.com | @synhershko <https://twitter.com/synhershko> 
> > Freelance Developer & Consultant Lucene.NET committer and PMC member
> >
> > On Sat, Oct 29, 2016 at 9:31 PM, Itamar Syn-Hershko 
> > <itamar@code972.com>
> > wrote:
> >
> > Hi Kirill,
> >
> > I'm assuming you are referring to our 4.8 release - it's currently 
> > on MyGet and not nuget:
> > https://www.myget.org/feed/lucene-net/package/nuget/Lucene.Net
> >
> > However, it does seem like the QueryParser package isn't pushed there.
> >
> > *Wyatt*, any chance you can look into why is this? the project is 
> > included in the sln file and I believe we already fixed that before
> >
> > Thanks
> >
> > --
> >
> > Itamar Syn-Hershko
> > http://code972.com | @synhershko <https://twitter.com/synhershko> 
> > Freelance Developer & Consultant Lucene.NET committer and PMC member
> >
> > On Wed, Oct 26, 2016 at 3:15 AM, Kumar Krishnamoorthy < 
> > kumar@seamlesscms.com> wrote:
> >
> > QueryParser is part of the core Lucene.Net assembly ( 
> > https://www.nuget.org/packages/Lucene.Net/).
> > Check under Lucene.Net.QueryParsers namespace.
> >
> >
> >
> >
> > Kumar Krishnamoorthy
> > Senior Product Developer
> >
> > Seamless | Empowering Digital Government
> > Phone: +613 9913 0020 <+61%203%209913%200020>
> > E-mail: kumar@seamlesscms.com
> > www.seamlesscms.com
> >
> >
> > -----Original Message-----
> > From: Kirill Gribunin [mailto:gribunin@gmail.com]
> > Sent: Tuesday, 25 October 2016 10:53 PM
> > To: user@lucenenet.apache.org
> > Subject: QueryParser package on NuGet
> >
> > Is QueryParser package available via Nuget? I dont see it in the 
> > list of available packages.
> >
> > Thanks,
> > Kirill Gribunin
> >
> >
> >
> >
>

Mime
View raw message