-
Notifications
You must be signed in to change notification settings - Fork 233
Elasticsearch as an index store
karthikprasad13 edited this page Sep 8, 2017
·
5 revisions
Elasticseach can be used to store indexes of NoSQL database to perform faster aggregations.
Kundera supported NoSQL databases that can leverage Elasticsearch as an indexing store:
- Cassandra
- Hbase
- MongoDB
- Kudu
- CouchDB
- Oracle NoSQL
- Redis
Note: Along with client dependency, Kundera-elastic-search
dependency will be needed.
Step 1
In persistence.xml
of a specific client, user needs to add the following -
<property name="kundera.indexer.class" value="com.impetus.client.es.index.ESIndexer"/>
Step 2
Add esindexer.xml
file in classpath.
Step 3
Specify the fields with @IndexCollection
annotation on which indexes are created.
Example:
@IndexCollection(columns = { @com.impetus.kundera.index.Index(name = "price") })
public class Product
{
@Column(name = "Price")
private int price;
}
All set for strong indexes in Elasticsearch.