missing feature in lucene 4.0 snapshot

2019-05-02 15:59发布

I'm trying to use lucene 4.0 snapshot version, however StandardAnalyzer is missing in this version :(. Anybody knows on how to replace this?

In the sample code given in the Lucene Summary

the StandardAnalyzer is used, but no where to be found..

thanks in advance.

标签: java lucene
4条回答
唯我独甜
2楼-- · 2019-05-02 16:11

Here is the Maven dependency:

    <dependency>
        <groupId>org.apache.lucene</groupId>
        <artifactId>lucene-analyzers-common</artifactId>
        <version>4.0.0-BETA</version>
    </dependency>
查看更多
Bombasti
3楼-- · 2019-05-02 16:14

Since 4.0, I see it here: lucene-4.0.0\analysis\common\src\java\org\apache\lucene\analysis\standard In eclipse, create a separate project for analysis, and include in its build path the core project. You will find some red marks because of some foreign characters in foreign language packages, I have ignored them for now because I only wanted standard analyzer. Hope this helps and saves you a lot of man hours and some frustration.

查看更多
地球回转人心会变
4楼-- · 2019-05-02 16:21

You have found standard analyzer in andriy 's answer..and for indexwriter the syntax is different in lucene 4.0..you can get the idea from the link:

http://lucene.apache.org/core/4_0_0-ALPHA/demo/src-html/org/apache/lucene/demo/IndexFiles.html

查看更多
Rolldiameter
5楼-- · 2019-05-02 16:28

Looks like the StandardAnalyzer was moved under org.apache.lucene.modules.analysis.standard.* You can find the StandardAnalyzer in the SVN Trunk

The reason is here

查看更多
登录 后发表回答