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:[email protected]] Sent: Thursday, November 3, 2016 8:15 PM To: [email protected] 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:[email protected]] Gesendet: Donnerstag, 3. November 2016 13:39 An: [email protected] 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 <[email protected]> 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:[email protected]] > Gesendet: Dienstag, 1. November 2016 03:29 > An: Itamar Syn-Hershko <[email protected]>; > [email protected]; [email protected] > 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 > <[email protected]> > 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 > > <[email protected]> > > 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 < > > [email protected]> 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: [email protected] > > www.seamlesscms.com > > > > > > -----Original Message----- > > From: Kirill Gribunin [mailto:[email protected]] > > Sent: Tuesday, 25 October 2016 10:53 PM > > To: [email protected] > > Subject: QueryParser package on NuGet > > > > Is QueryParser package available via Nuget? I dont see it in the > > list of available packages. > > > > Thanks, > > Kirill Gribunin > > > > > > > > >
