# How to do this in Elasticsearch?

**URL:** <https://discuss.elastic.co/t/how-to-do-this-in-elasticsearch/12017>\
**Category:** Elasticsearch\
**Created:** [May 17, 2013, 9:57pm UTC](https://discuss.elastic.co/t/how-to-do-this-in-elasticsearch/12017 "2013-05-17T21:57:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Srinivas\_Nalluri](https://avatars.discourse-cdn.com/v4/letter/s/eb9ed0/32.png) [@Srinivas\_Nalluri](https://discuss.elastic.co/u/Srinivas_Nalluri)\
**Post date:** [May 17, 2013, 9:57pm UTC](https://discuss.elastic.co/t/how-to-do-this-in-elasticsearch/12017/1 "2013-05-17T21:57:01Z")

</div>

I am coming from Solr, new to Elasticsearch.

The following snippet is from Solr entity.xm. How to do same kind of  
requirement in Elasticsearch? Means, based on an ID, get some fields from a  
different table and insert in to the document.

\<entity name="poll\_details" dataSource="vign" transformer=  
"ClobTransformer,RegexTransformer"

```
   query="select HEAD_POLL_ID, HEAD_POLL_TITLE,PUBLISHED_DATE from 

```

fox\_poll where id= '${vign-poll.VCMID}'"\>

```
    <field column="HEAD_POLL_ID" name="secondary_id" />

    <field column="HEAD_POLL_TITLE" name="title" />

    <field column="PUBLISHED_DATE" name="date" />

    </entity>

```

I am very new to ES, I knew only that I can call a sql which creating an  
index:

"sql" : "select \* from furl\_table"

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![mattweber](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mattweber/32/44940_2.png) [@mattweber](https://discuss.elastic.co/u/mattweber)\
**Post date:** [May 17, 2013, 10:03pm UTC](https://discuss.elastic.co/t/how-to-do-this-in-elasticsearch/12017/2 "2013-05-17T22:03:08Z")

</div>

You will want to look into the JDBC River plugin:

> **[GitHub - jprante/elasticsearch-jdbc: JDBC importer for Elasticsearch](https://github.com/jprante/elasticsearch-jdbc)**
>
> JDBC importer for Elasticsearch. Contribute to jprante/elasticsearch-jdbc development by creating an account on GitHub.

Thanks,  
Matt Weber

On Fri, May 17, 2013 at 2:57 PM, Srinivas Nalluri [nallurisrini@gmail.com](mailto:nallurisrini@gmail.com)wrote:

> I am coming from Solr, new to Elasticsearch.
> 
> The following snippet is from Solr entity.xm. How to do same kind of  
> requirement in Elasticsearch? Means, based on an ID, get some fields from a  
> different table and insert in to the document.
> 
> \<entity name="poll\_details" dataSource="vign" transformer=  
> "ClobTransformer,RegexTransformer"
> 
> ```
> query="select HEAD_POLL_ID, HEAD_POLL_TITLE,PUBLISHED_DATE from
> 
> ```
> 
> fox\_poll where id= '${vign-poll.VCMID}'"\>
> 
> ```
> <field column="HEAD_POLL_ID" name="secondary_id" />
> 
> <field column="HEAD_POLL_TITLE" name="title" />
> 
> <field column="PUBLISHED_DATE" name="date" />
> 
> </entity>
> 
> ```
> 
> I am very new to ES, I knew only that I can call a sql which creating an  
> index:
> 
> "sql" : "select \* from furl\_table"
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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 6, 2017, 2:35am UTC](https://discuss.elastic.co/t/how-to-do-this-in-elasticsearch/12017/3 "2017-07-06T02:35:59Z")

</div>


