Terrastore - ElasticSearch integration preview


(Sergio Bossa) #1

Hi guys,

Terrastore and ElasticSearch make up together a complete document
oriented solution for storing, processing, indexing and searching your
data.
A seamless integration was natural, so we created Terrastore-Search!

Terrastore-Search will let you store, retrieve and process Terrastore
documents as usual, and transparently index every change on
ElasticSearch.
You can take a sneak preview by following the steps below:

1a) Check out the latest Terrastore sources:
http://code.google.com/p/terrastore/source/checkout?repo=default
1b) Build a distribution by running: mvn package assembly:assembly

  1. Check out and build the latest ElasticSearch sources:
    http://wiki.github.com/elasticsearch/elasticsearch/getting-started-with-the-source-code

3a) Check out Terrastore-Search from sources:
http://code.google.com/p/terrastore/source/checkout?repo=search
3b) Build a distribution by running: mvn package assembly:assembly

  1. Install Terrastore master and server(s) (without running any
    node): http://code.google.com/p/terrastore/wiki/Getting_Started

5a) Copy all Terrastore-Search libs inside Terrastore server(s) libs directory.
5b) Copy terrastore-search.xml into Terrastore server(s) home directory.

  1. Enable Terrastore-Search by modifying Terrastore events-config.xml
    as follows:

    <util:list id="event-listeners">

    </util:list>



  2. Run Terrastore master and server nodes:
    http://code.google.com/p/terrastore/wiki/Getting_Started

  3. Try it out!
    8a) Create a bucket into Terrastore:
    $> curl -v -X PUT -H "Content-Type: application/json"
    http://localhost:8080/bucket
    8b) Put a document into Terrastore:
    $> curl -v -X PUT -H "Content-Type: application/json" -d "{"key" :
    "value"}" http://localhost:8080/bucket/test
    8c) Search through embedded ElasticSearch:
    $> curl -v -X GET -H "Content-Type: application/json"
    http://127.0.0.1:9200/search/bucket/_search?q=key:value

Remember this is just a preview: your feedback is greatly appreciated!

Cheers,

Sergio B.

--
Sergio Bossa
http://www.linkedin.com/in/sergiob


(Shay Banon) #2

Sergio, great job!. This is just the first step at trying and create a
complete and seamless integration, but I hope the value of it is evident.
Many nosql solution would love to "get their search going", and this
integration just proves that something like this is quite easily achieved
with elasticsearch. I did my small part in the integration, but as you can
see in the code:
http://code.google.com/p/terrastore/source/browse/src/main/java/terrastore/search/ElasticSearchListener.java?repo=search,
the integration is quite simple which I hope speaks of the ease of use of
both products.

-shay.banon

On Sat, Feb 20, 2010 at 4:13 PM, Sergio Bossa sergio.bossa@gmail.comwrote:

Hi guys,

Terrastore and ElasticSearch make up together a complete document
oriented solution for storing, processing, indexing and searching your
data.
A seamless integration was natural, so we created Terrastore-Search!

Terrastore-Search will let you store, retrieve and process Terrastore
documents as usual, and transparently index every change on
ElasticSearch.
You can take a sneak preview by following the steps below:

1a) Check out the latest Terrastore sources:
http://code.google.com/p/terrastore/source/checkout?repo=default
1b) Build a distribution by running: mvn package assembly:assembly

  1. Check out and build the latest ElasticSearch sources:

http://wiki.github.com/elasticsearch/elasticsearch/getting-started-with-the-source-code

3a) Check out Terrastore-Search from sources:
http://code.google.com/p/terrastore/source/checkout?repo=search
3b) Build a distribution by running: mvn package assembly:assembly

  1. Install Terrastore master and server(s) (without running any
    node): http://code.google.com/p/terrastore/wiki/Getting_Started

5a) Copy all Terrastore-Search libs inside Terrastore server(s) libs
directory.
5b) Copy terrastore-search.xml into Terrastore server(s) home directory.

  1. Enable Terrastore-Search by modifying Terrastore events-config.xml
    as follows:

    <util:list id="event-listeners">

    </util:list>



  2. Run Terrastore master and server nodes:
    http://code.google.com/p/terrastore/wiki/Getting_Started

  3. Try it out!
    8a) Create a bucket into Terrastore:
    $> curl -v -X PUT -H "Content-Type: application/json"
    http://localhost:8080/bucket
    8b) Put a document into Terrastore:
    $> curl -v -X PUT -H "Content-Type: application/json" -d "{"key" :
    "value"}" http://localhost:8080/bucket/test
    8c) Search through embedded ElasticSearch:
    $> curl -v -X GET -H "Content-Type: application/json"
    http://127.0.0.1:9200/search/bucket/_search?q=key:value

Remember this is just a preview: your feedback is greatly appreciated!

Cheers,

Sergio B.

--
Sergio Bossa
http://www.linkedin.com/in/sergiob


(system) #3