Table of Contents
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:
In the above configuration, the index backend is named
search by a different name to change the name of the index.
- Full-Text: Supports all
Textpredicates to search for text properties that matches a given word, prefix or regular expression.
- Geo: Supports the
Geo.WITHINcondition to search for points that fall within a given geographic shape. Only supports points for indexing and circles and boxes for querying.
- Numeric Range: Supports all numeric comparisons in
Refer to Chapter 12, Configuration Reference for a complete listing of all Lucene specific configuration options in addition to the general Titan configuration options.
Note, that each of the index backend options needs to be prefixed with
[INDEX-NAME] stands for the name of the index backend. For instance, if the index backend is named search then these configuration options need to be prefixed with
To configure an index backend named search to use Lucene as the index system, set the following configuration option:
index.search.backend = lucene
- Please refer to the Lucene homepage and available documentation for more information on Lucene.