Apache Lucene is a high-performance, full-featured text search engine library written entirely in Java. It is a technology suitable for nearly any application that requires full-text search, especially cross-platform. Apache Lucene is an open source project available for free download. — Apache Lucene Homepage
Titan supports Lucene as a single-machine, embedded index backend. Lucene has a slightly extended feature set and performs better in small-scale applications compared to Elasticsearch, but is limited to single-machine deployments.
For single machine deployments, Lucene runs embedded with Titan. Titan starts and interfaces with Lucene internally.
To run Lucene embedded, add the following configuration options to the graph configuration file where /tmp/searchindex/
specifies the directory where Lucene should store the index data:
storage.index.search.backend=lucene
storage.index.search.directory=/tmp/searchindex
In the above configuration, the index backend is named search
. Replace search
by a different name to change the name of the index.
Text.CONTAINS
condition to search for text properties that contain a given word.Geo.WITHIN
condition to search for points that fall within a given geographic shape. Only supports points for indexing and circles and boxes for querying.Compare
.Option | Description | Value | Default | Modifiable |
---|---|---|---|---|
backend | Index backend implementation name | elasticsearch | – | – |
directory | Directory to store Lucene data. | string | – | yes |