All versions of this manual
X
 

Search index: JanusGraph

The janusGraphSearch connector is the recommended solution for full-text search for graphs with more than 100,000 nodes and edges.

JanusGraph search integration

Linkurious can use the builtin search indices managed by JanusGraph itself. You can either use the Web user-interface or edit the configuration file located at linkurious/data/config/production.json to set the index.vendor property to the value janusGraphSearch.

Configuration

To edit the JanusGraph data-source configuration, you can either use the Web user-interface or edit the configuration file located at linkurious/data/config/production.json.

Example configuration:

{
  "dataSources": [
    {
      "graphdb": {
        "vendor": "janusGraph",
        "url": "ws://127.0.0.1:8182/",
        "configuration": {
          "storage.backend": "cassandra",
          "storage.hostname": "127.0.0.1"
        }
      },
      "index": {
        "vendor": "janusGraphSearch",
        "create": true
      }
    }
  ]
}

Solr Configuration

To use Solr as an index backend for JanusGraphSearch, you first need to create a Solr collection for indexing the nodes. A second collection must be created if you want to index the edges as well.

The collections should be named linkurious_index and linkurious_index_edges for nodes and edges respectively. Please refer to the Solr configuration overview on how to create a collection.

Here an example on how to provide Solr configuration information to Linkurious.

Example configuration:

{
  "dataSources": [
    {
      "graphdb": {
        "vendor": "janusGraph",
        "url": "ws://127.0.0.1:8182/",
        "configuration": {
          "storage.backend": "cassandra",
          "storage.hostname": "127.0.0.1",
          "index.search.backend": "solr",
          "index.search.solr.mode": "cloud",
          "index.search.solr.zookeeper-url": "localhost:9983"
        }
      },
      "index": {
        "vendor": "janusGraphSearch",
        "create": true
      }
    }
  ]
}

Linkurious will not override globally managed configuration values.

Supported index options with JanusGraphSearch:

  • create (optional): true to let Linkurious create the index if it does not exist
  • indexEdges (optional): true to enable search on edge properties
  • nodeIndexName (optional): Name of the index to use to search nodes (defaults to the first index created among the available indices)
  • edgeIndexName (optional): Name of the index to use to search edges (defaults to the first index created among the available indices)

Create a search index in JanusGraph

Linkurious will automatically create a search index in JanusGraph if the index option "create" is true. However, Linkurious can also use a mixed search index that already exist in JanusGraph.

Please refer to the JanusGraph documentation on how to create mixed indices if you want to create one directly.