Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use Solr indexes from Elasticsearch

I was using Solr for indexing and searching. Now, my new data is being indexed on elasticsearch. How can I use Solr indexes from elasticsearch for combined searching?

Since Solr and elasticsearch both are built over Apache Lucene, there must be a way/plugin to consume Solr indexes form elasticsearch right?

My attempt:

I found a river for this, but rivers are deprecated in elasticsearch from 1.5.0.

like image 715
karthik manchala Avatar asked Jul 13 '15 07:07

karthik manchala


2 Answers

You cannot do it directly (without data migration) as their internal structures/representations are not compatible. Their query languages are also not compatible.

But you might be able to use a Federated engine in front of them, such as Carrot2.

like image 175
Alexandre Rafalovitch Avatar answered Oct 13 '22 04:10

Alexandre Rafalovitch


Although both search servers are using Lucene (and internally indexes are stored as Lucene indexes) they are many differences in how they use Lucene when handing documents (like documents versions, sharding strategies, dynamic mapping, etc...) that would make difficult to use the same index in place. If your data is stored in the SolR instance you might be able to extract them from SolR and push them in your ElasticSearch.

By the way the river gives you the same limitation: "only stored fields can be retrieved from Solr, therefore indexed in elasticsearch"

like image 45
Stephan L Avatar answered Oct 13 '22 04:10

Stephan L