Lucene.net 4.8 - IDE doesn't recognize Lucene.Net.Standard as well as the StandardAnalyzer's

给你一囗甜甜゛ 提交于 2021-01-27 12:22:51

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!