forked from thinkaurelius/titan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlucene.txt
48 lines (32 loc) · 2.53 KB
/
lucene.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
[[lucene]]
Lucene
------
//[.tss-center.tss-width-250]
//image:titan-lucene.png[]
[quote, 'http://lucene.apache.org/[Apache Lucene Homepage]']
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.
Titan supports http://lucene.apache.org/[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, Elasticsearch>>, but is limited to single-machine deployments.
Lucene 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:
[source, properties]
index.search.backend=lucene
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`.
* *Temporal*: Nanosecond granularity temporal indexing.
Configuration Options
~~~~~~~~~~~~~~~~~~~~~
Refer to <<titan-config-ref>> 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.[INDEX-NAME].` where `[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 `index.search.`.
To configure an index backend named _search_ to use Lucene as the index system, set the following configuration option:
[source, properties]
index.search.backend = lucene
Further Reading
~~~~~~~~~~~~~~~
* Please refer to the http://lucene.apache.org/[Lucene homepage] and available documentation for more information on Lucene.