替代IndexProvider for Neo4J 1.9.1

Mic*_*ear 8 lucene neo4j

我在我的应用程序中使用Lucene 4并且不想更改它.我正在尝试集成Neo4J,它将Lucene 3.5捆绑为IndexProvider实现,neo4j-lucene-index.

不幸的是,neo4j-lucene-index不起作用,并且排除了这种依赖性,应用程序只会在启动时无限期挂起.我已经尝试过neo4j-lucene4-index,但这似乎没有得到很好的维护,需要更新才能与Neo4J 1.9.1一起使用.这些变化超出了我对Neo4J内部的理解.

但是,我可以看到IndexProviders是可插拔的,所以我希望有一个现有的Lucene替代品 - 我现在无法找到它.任何人都可以指出我正确的方向吗?

Lucene 4已经出现了很长时间并且Neo4J不支持它,这似乎很奇怪.我错过了什么吗?

目前,我的POM对于我的Neo4J配置看起来像这样:

<dependency>
    <groupId>org.springframework.data</groupId>
    <artifactId>spring-data-neo4j</artifactId>
    <version>2.2.1.RELEASE</version>
    <exclusions>
        <exclusion>
        <artifactId>neo4j</artifactId>
        <groupId>org.neo4j</groupId>
        </exclusion>
        <exclusion>
        <artifactId>neo4j-cypher</artifactId>
        <groupId>org.neo4j</groupId>
        </exclusion>
    </exclusions>
</dependency>
<dependency>
    <groupId>org.neo4j</groupId>
    <artifactId>neo4j-kernel</artifactId>
    <version>1.9.1</version>
    <exclusion>
        <groupId>org.neo4j</groupId>
        <artifactId>neo4j-lucene-index</artifactId>
    </exclusion>
</dependency>

<dependency>
    <groupId>org.neo4j.app</groupId>
    <artifactId>neo4j-server</artifactId>
    <version>1.9.1</version>
    <exclusions>
        <exclusion>
        <artifactId>neo4j</artifactId>
        <groupId>org.neo4j</groupId>
        </exclusion>
        <exclusion>
        <artifactId>neo4j-cypher</artifactId>
        <groupId>org.neo4j</groupId>
        </exclusion>
        <exclusion>
        <groupId>org.neo4j</groupId>
        <artifactId>neo4j-lucene-index</artifactId>
        </exclusion>
    </exclusions>
</dependency>

    <!-- A temporary dependency until Neo4J builds in support for Lucene 4. 
    Looks like they're planning to incorporate this project anyway This project 
    is available on GitHub, and needs to be built with: mvn license:format mvn 
    install to install into your local repo. 
        <dependency>
            <groupId>com.keatext</groupId>
            <artifactId>neo4j-lucene4-index</artifactId>
            <version>1.9.M01-SNAPSHOT</version>
        </dependency>-->

<dependency>
    <groupId>org.hibernate</groupId>
    <artifactId>hibernate-validator</artifactId>
    <version>5.0.1.Final</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)

Ste*_*ter 1

从 1.8 -> 1.9 内部发生了一些变化。简而言之,索引提供者必须通过 META-INF/services 注册 KernelExtensionFactory,请参阅https://github.com/neo4j/neo4j/blob/master/community/lucene-index/src/main/resources/META-INF/服务/org.neo4j.kernel.extension.KernelExtensionFactory

这个 KernelExtensionFactory 是入口点,只需在https://github.com/neo4j/neo4j/tree/master/community/lucene-index上查看基于 Lucene 3 的实现即可。