Using Lucene

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.


Elasticsearch Embedded Configuration

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.

Feature Support

  • Full-Text: Supports all Text predicates to search for text properties that matches a given word, prefix or regular expression.
  • Geo: Supports the 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.
  • Numeric Range: Supports all numeric comparisons in Compare.

Configuration Options

Option Description Value Default Modifiable
backend Index backend implementation name elasticsearch
directory Directory to store Lucene data. string yes

Next Steps

  • Please refer to the Lucene homepage and available documentation for more information on Lucene.
Last edited by Dan LaRocque, 2013-10-16 08:54:20