Code Monkey home page Code Monkey logo

elasticsearch-river-neo4j's Introduction

Neo4j River Plugin for ElasticSearch

Neo4j River Plugin is a river module for Elasticsearch that will continuously poll a neo4j server and index the nodes for searching inside elastic search. The period betweens polls can be configured. All nodes will be updated on each poll, and any deleted nodes since the last poll will be removed from the index. Versioning is used to identify which nodes have been removed since the last poll.

The nodes will be indexed using the properties set on them, with the neo4j node id being the id used inside elastic. So if you have a node of id=7 with the properties name=sam and location=london then the elastic search index request would look like

{
 "_id" : 7,
 "name" : "sam",
 "location" : "london",
 "version" : 1234567
}

Plugin history

Neo4j Driver Plugin ElasticSearch Neo4j
0.90.1.x 0.90.1 1.8.x

Build Status

How to use

Start the neo4j river by curling a document like the following to the river index.

curl -XPUT 'http://localhost:9200/_river/my_neo_river/_meta' -d '{
    "type": "neo4j",
    "neo4j": {
        "uri": "<NEO4J_URI>",
        "interval": <some interval>
    },
    "index": {
        "name": "<INDEX_NAME>",
        "type: "<TYPE>"
    }
}'

The following parameters are available in the neo4j river document.

Parameter Description
neo4j.uri The full URI to the neo4j server, eg http://localhost:7474/db/data
neo4j.interval The time between polling the neo4j instance. The greater this value, the lower the load on the server but the longer between updates in neo4j being reflected inside elastic
index.name The name of the index to index nodes into
index.type The type to use for indexing

Integration Tests

Make sure you are running a neo4j server on localhost:7474 or alternatively update the neo4j-inttest-river.json settings inside src/test/resources to point to your local server.

Then execute: mvn -Pint-test clean install

How to install

The plugin is available on maven central.

<dependency>
    <groupId>com.sksamuel.elasticsearch</groupId>
    <artifactId>elasticsearch-river-neo4j</artifactId>
    <version>0.90.1.1</version>
</dependency>

To install run:

$ bin\plugin -install com.sksamuel.elasticsearch/elasticsearch-river-neo4j/0.90.1.1

License

This software is licensed under the Apache 2 license, quoted below.

Copyright 2013 Stephen Samuel

Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.

elasticsearch-river-neo4j's People

Contributors

sksamuel avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.