# How to move from solr to elastichsearch?

**URL:** <https://discuss.elastic.co/t/how-to-move-from-solr-to-elastichsearch/53391>\
**Category:** Elasticsearch\
**Created:** [June 21, 2016, 3:02am UTC](https://discuss.elastic.co/t/how-to-move-from-solr-to-elastichsearch/53391 "2016-06-21T03:02:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yuuta](https://avatars.discourse-cdn.com/v4/letter/y/71c47a/32.png) [@yuuta](https://discuss.elastic.co/u/yuuta)\
**Post date:** [June 21, 2016, 3:02am UTC](https://discuss.elastic.co/t/how-to-move-from-solr-to-elastichsearch/53391/1 "2016-06-21T03:02:36Z")

</div>

Dear anyone,  
currently I am using solr in my system, but now I would like to exchange to elastic. I do not know how to change from this config in solr to elastic. Please help to give me some solution. thanks a lot.

Example:  
I configured in db-data-config.xml to fetch data from mysql to index by define entities like this:

\<;dataConfig\>  
\<;dataSource type="JdbcDataSource" driver="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/bookstore" user="root" password="" /\>  
\<;document\>  
\<;entity name="book" query="SELECT id, title, author, category, description from book"\>  
\<;field column="id" name="id" /\>  
\<;field column="title" name="title" /\>  
\<;field column="description" name="description" /\>  
\<;entity name="category\_name" query="SELECT cat\_name FROM category c where [c.id](http://c.id) = '${book.category}'"\>  
\<;field name="category\_name" column="cat\_name" /\>  
\<;/entity\>  
\<;entity name="author\_name" query="SELECT name FROM author a where [a.id](http://a.id) = '${book.author}'"\>  
\<;field name="author\_name" column="name" /\>  
\<;/entity\>  
\<;field column="last\_modified" name="last\_modified"/\>  
\<;/entity\>  
\<;/document\>  
\<;/dataConfig\>

in both of entity : [catefory\_name] and [author\_name], the sql statement will get parameter  
${book.category} and ${book.author}'. It means that these both entities are transferring value from book as parameter to both entities(category\_name and author\_name).

the same way, I would like to make index and filter in elastic.  
I am used jdbc to connect to mysql to make indices.  
but I cannot make indices between parent and child relations at elastic.  
what should I do in elastic?

thanks a lot.

best regards,

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 10:41pm UTC](https://discuss.elastic.co/t/how-to-move-from-solr-to-elastichsearch/53391/2 "2017-07-05T22:41:58Z")

</div>


