Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache Cassandra integration with Apache Solr

Tags:

cassandra

solr

I'm familiar with Apache Solr on an MSSQL database, but now I'm looking how I can integrate Apache Solr with Apache Cassandra instead of my MSSQL database.

I'm looking for tutorials and first steps setting up this integration, but can't find anything useful.

With an MSSQLDB my data-config would look like this for example:

<dataConfig>
<dataSource driver="com.microsoft.sqlserver.jdbc.SQLServerDriver" url="jdbc:sqlserver://localhost:1433;databaseName=test" user="sa" password="74667fghbjj3" />
<document name="cameras">
    <entity name="camera" query="select * from cameras WHERE isapproved='true'"
    deltaImportQuery="select * from cameras WHERE updatedate &lt; getdate() AND isapproved='true' AND id='${dataimporter.delta.id}'"
    deltaQuery="select id from cameras where isapproved='true' AND updatedate &gt; '${dataimporter.last_index_time}'">              
        <field name="id" column="ID" />
        <field name="title" column="TITLE" />
        <field name="friendlyurl" column="FRIENDLYURL" />           

        <entity name="camera_country" query="select countryid from cameras where id=${camera.id}">
            <entity name="countries" query="select title_nl as country_nl,title_en as country_en from countries where id = ${camera_country.countryid}">
            </entity>
        </entity>
    </entity>
</document>
</dataConfig>

But how would I go about this using Cassandra as my NOSQL DB?

Thanks!

like image 695
Adam Avatar asked Sep 07 '12 20:09

Adam


People also ask

Where is Apache Solr used?

Solr is popular for websites as it can be used to index and search multiple sites, as well as for enterprise search because it can index and search documents and email attachments.

Why do we use Solr?

Solr is a search server built on top of Apache Lucene, an open source, Java-based, information retrieval library. It is designed to drive powerful document retrieval applications - wherever you need to serve data to users based on their queries, Solr can work for you.

How do I run Solr indexing?

If you didn't start Solr after installing it, you can start it by running bin/solr from the Solr directory. If you are running Windows, you can start Solr by running bin\solr. cmd instead. This will start Solr in the background, listening on port 8983.


1 Answers

Solandra was an open-source hobby project by Jake Luciani. He tells the history of Solandra and led the development of DSE Search, the next generation of Solandra. He talks about it in this blog post. It's the best way that I know of to use the regular Solr 4 interface with Cassandra to replicate the data and provide things like fault tolerance. You can download it to try it out for free and DataStax does have special pricing for startups, for what it's worth. It's just that DataStax had to justify investing resources in it. For more details on it, see the docs. Disclaimer, I do work for DataStax.

like image 82
Jeremy Hanna Avatar answered Sep 17 '22 21:09

Jeremy Hanna