问题
Im using Lucene.net version 4.8beta, and when trying to use an Analyzer it doesnt recognize StandardTokenizer. I am already using Lucene.Net.Analysis. I am using Visual Studio
I have already tried using NuGet package manager to uninstall, and then reinstall the beta. I have an old project that uses Lucene.net 3.03 that uses some of the standard Tokenizers such as WhitespaceTokenizer and LowerCaseFilter. All the guides in the 4.8 Documentation mention using StandardTokenizer as well.
TokeStream result = new WhiteSpaceTokenizer(reader);
result = new LowerCaseFilter(result);
I expect the function to be useable, but this just tells me that it doesnt recognize it.
回答1:
Guess I just figured out why.
Bumped into the same situation. NuGet Manager will only offer v3.03 as the "latest stable version" so I had to install versino 4.8.0-beta00006 via command line
Install-Package Lucene.Net -Pre
As Lucene.Net Quick Start Guide advised.
However, what they "forget" to tell you is that, you will need to install another separate one:
Install-Package Lucene.Net.Analysis.Common -Version 4.8.0-beta00006
This one will bring closure to all the gaps.
Man why don't they package everything all together... when I'm buying a car I'm expecting a car. Have to buy steering wheel separately? That's awkward...
来源:https://stackoverflow.com/questions/57196803/lucene-net-4-8-ide-doesnt-recognize-lucene-net-standard-as-well-as-the-standa