Quantcast

Terrastore - ElasticSearch integration preview

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Terrastore - ElasticSearch integration preview

Sergio Bossa
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

2) 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

4) 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.

6) Enable Terrastore-Search by modifying Terrastore events-config.xml
as follows:
    <import resource="terrastore-search.xml"/>
    <util:list id="event-listeners">
        <ref bean="searchListener"/>
    </util:list>
    <bean id="eventBus" class="terrastore.event.impl.AsyncEventBus">
        <constructor-arg ref="event-listeners"/>
        <constructor-arg value="3600"/>
    </bean>

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

8) 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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Terrastore - ElasticSearch integration preview

kimchy
Administrator
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 <[hidden email]> wrote:
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:
<a href="http://code.google.com/p/terrastore/source/checkout?repo=default 1b" target="_blank">http://code.google.com/p/terrastore/source/checkout?repo=default
1b) Build a distribution by running: mvn package assembly:assembly

2) 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:
<a href="http://code.google.com/p/terrastore/source/checkout?repo=search 3b" target="_blank">http://code.google.com/p/terrastore/source/checkout?repo=search
3b) Build a distribution by running: mvn package assembly:assembly

4) 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.

6) Enable Terrastore-Search by modifying Terrastore events-config.xml
as follows:
   <import resource="terrastore-search.xml"/>
   <util:list id="event-listeners">
       <ref bean="searchListener"/>
   </util:list>
   <bean id="eventBus" class="terrastore.event.impl.AsyncEventBus">
       <constructor-arg ref="event-listeners"/>
       <constructor-arg value="3600"/>
   </bean>

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

8) Try it out!
8a) Create a bucket into Terrastore:
$> curl -v -X PUT -H "Content-Type: application/json"
<a href="http://localhost:8080/bucket 8b" target="_blank">http://localhost:8080/bucket
8b) Put a document into Terrastore:
$> curl -v -X PUT -H "Content-Type: application/json" -d "{\"key\" :
\"value\"}" <a href="http://localhost:8080/bucket/test 8c" target="_blank">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

Loading...