You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lucenenet.apache.org by Darrell Tunnell <da...@gmail.com> on 2018/01/08 23:34:53 UTC

KeywordAnalyzer in 4.8.0 beta

I am looking at upgrading the following repo: https://github.com/themotleyfool/Lucene.Net.Linq/tree/v4_0
From Lucene.Net 3.0.3 to the latest 4 beta packages.

The first issue I have hit is that I can’t get this analyser to compile: https://github.com/themotleyfool/Lucene.Net.Linq/blob/v4_0/source/Lucene.Net.Linq/Analysis/CaseInsensitiveKeywordAnalyzer.cs
Because it derives from `KeywordAnalyzer` which is now sealed.

What should I be doing instead?

Many Thanks

Darrell

RE: KeywordAnalyzer in 4.8.0 beta

Posted by Shad Storhaug <sh...@shadstorhaug.com>.
Darrell,

Refer to these StackOverflow answers: 

https://stackoverflow.com/a/38695007 
https://stackoverflow.com/a/42027509

You wouldn't extend an analyzer, because that would effectively mean wrapping one instance of TokenStreamResult inside of another. For performance reasons, it is better to copy the contents of an existing analyzer and modify it as required. This was a design decision that the Lucene team made that was carried over into Lucene.Net.

Thanks,
Shad Storhaug (NightOwl888)



-----Original Message-----
From: 小康 [mailto:xiaokang@cnblogs.com] 
Sent: Tuesday, January 9, 2018 2:46 PM
To: user@lucenenet.apache.org
Subject: Re: KeywordAnalyzer in 4.8.0 beta

I  think you should install this package for you project.
https://www.nuget.org/packages/Lucene.Net.Analysis.Common/

In the new version (4.8.0) ,'KeywordAnalyzer' has changed package.Now it is in Lucene.Net.Analysis.Common package.

2018-01-09 7:34 GMT+08:00 Darrell Tunnell <da...@gmail.com>:

>
> I am looking at upgrading the following repo: https://github.com/
> themotleyfool/Lucene.Net.Linq/tree/v4_0
> From Lucene.Net 3.0.3 to the latest 4 beta packages.
>
> The first issue I have hit is that I can’t get this analyser to compile:
> https://github.com/themotleyfool/Lucene.Net.Linq/
> blob/v4_0/source/Lucene.Net.Linq/Analysis/CaseInsensitiveKeywordAnalyz
> er
> .cs
> Because it derives from `KeywordAnalyzer` which is now sealed.
>
> What should I be doing instead?
>
> Many Thanks
>
> Darrell
>

Re: KeywordAnalyzer in 4.8.0 beta

Posted by 小康 <xi...@cnblogs.com>.
I  think you should install this package for you project.
https://www.nuget.org/packages/Lucene.Net.Analysis.Common/

In the new version (4.8.0) ,'KeywordAnalyzer' has changed package.Now it is
in Lucene.Net.Analysis.Common package.

2018-01-09 7:34 GMT+08:00 Darrell Tunnell <da...@gmail.com>:

>
> I am looking at upgrading the following repo: https://github.com/
> themotleyfool/Lucene.Net.Linq/tree/v4_0
> From Lucene.Net 3.0.3 to the latest 4 beta packages.
>
> The first issue I have hit is that I can’t get this analyser to compile:
> https://github.com/themotleyfool/Lucene.Net.Linq/
> blob/v4_0/source/Lucene.Net.Linq/Analysis/CaseInsensitiveKeywordAnalyzer
> .cs
> Because it derives from `KeywordAnalyzer` which is now sealed.
>
> What should I be doing instead?
>
> Many Thanks
>
> Darrell
>