forked from Impetus/kundera
-
Notifications
You must be signed in to change notification settings - Fork 0
Elasticsearch as an index store
karthikprasad13 edited this page Sep 15, 2016
·
3 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
- CouchDB
- Oracle NoSQL
- Redis
Note: Along with client dependency, Kundera-elastic-search
dependency will be needed.
##How to use
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.
##Aggregation on NoSQL data using Kundera Elasticsearch