# Search with database

**URL:** https://discuss.elastic.co/t/search-with-database/2183
**Category:** Elasticsearch
**Created:** [June 9, 2015, 7:02am UTC](https://discuss.elastic.co/t/search-with-database/2183 "2015-06-09T07:02:32Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![meghna](https://avatars.discourse-cdn.com/v4/letter/m/d78d45/32.png) [@meghna](https://discuss.elastic.co/u/meghna)
#### Post date: [June 9, 2015, 7:02am UTC](https://discuss.elastic.co/t/search-with-database/2183/1 "2015-06-09T07:02:32Z")

</div>

Hi,

I am new to Elastic Search. I am developing application in PHP and MySQL.

I need to implement search functionality in my application. Basic requirements are as follows:

1\> Search keyword will match against the entire database. I have application database in MySQL with multiple tables.  
2\> It should auto suggestive search same as google. e.g. once you type any letter, it will auto suggest with matching records.  
3\> How to integrate/configure my application database with elastic search?  
4\> Which API will be used to achieve web search.  
4\> Are there any charges involved for using any API of elastic?

Looking forward your response.

Thanks

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [June 9, 2015, 8:55am UTC](https://discuss.elastic.co/t/search-with-database/2183/2 "2015-06-09T08:55:41Z")

</div>

> 1\> Search keyword will match against the entire database. I have application database in MySQL with multiple tables.

That data needs to be imported into Elasticsearch. ES is not a search interface on top of existing data stores, it's a data store in itself.

> 2\> It should auto suggestive search same as google. e.g. once you type any letter, it will auto suggest with matching records.

Okay, that's doable.

> 3\> How to integrate/configure my application database with Elasticsearch?

That question is too open to answer in short form.

> 4\> Which API will be used to achieve web search.

Elasticsearch has a REST interface so technically you could expose it directly to your web clients, but you probably want to use an application server or similar as a proxy. The application server could either use said REST API or the native Java API.

> 4\> Are there any charges involved for using any API of elastic?

Elasticsearch is usually self-hosted. There are hosted solutions and I think it's safe to assume that they come at a cost.

---

<div class="post-metadata">

### Author: ![meghna](https://avatars.discourse-cdn.com/v4/letter/m/d78d45/32.png) [@meghna](https://discuss.elastic.co/u/meghna)
#### Post date: [June 9, 2015, 10:24am UTC](https://discuss.elastic.co/t/search-with-database/2183/3 "2015-06-09T10:24:58Z")

</div>

Thanks for the quick reply.

That data needs to be imported into Elasticsearch. ES is not a search  
interface on top of existing data stores, it's a data store in itself.  
=\> If I have real time data entered through web interface by the users, How efficient and feasible to send these data to elasticsearch.

Elasticsearch has a REST interface so technically you could expose it  
directly to your web clients, but you probably want to use an  
application server or similar as a proxy. The application server could  
either use said REST API or the native Java API.  
=\> What is application server?

---

<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, 12:08am UTC](https://discuss.elastic.co/t/search-with-database/2183/4 "2017-07-06T00:08:53Z")

</div>


