代码之家  ›  专栏  ›  技术社区  ›  morpheus05

未找到maven h2 lucene类

  •  1
  • morpheus05  · 技术社区  · 12 年前

    我在我的项目h2中使用,我喜欢启用lucene搜索索引。我添加了以下deps。到pom.xml:

    <dependency>
      <groupId>org.apache.lucene</groupId>
      <artifactId>lucene-core</artifactId>
      <version>4.4.0</version>
    </dependency>
    <dependency>
        <groupId>org.apache.lucene</groupId>
        <artifactId>lucene-analyzers-common</artifactId>
        <version>4.4.0</version>
    </dependency>
    

    我仍然从h2中得到java.lang.ClassNotFoundException:org.apache.locene.search.Searcher。这个问题只有在我启动程序时才会出现。

    1 回复  |  直到 12 年前
        1
  •  1
  •   guido    12 年前

    使用lucene<4.0.0; 这个 org.apache.lucene.search.Searcher 抽象类在3.6.0版本中已被弃用,从4.0.0开始作为/inder包含 org.apache.lucene.search.IndexSearcher .

    http://lucene.apache.org/core/3_6_0/api/core/deprecated-list.html