Adding search bar for my web application

My web application has all the data stored in the MySQL database.
I want to develop a search bar using elastic search for retrieving results faster.
How should I go about this?

Welcome to Elastic Discussion Forums!

There are a couple of ways to approach this one.

  1. You can use Logstash JDBC input plugin and ingest data to Elasticsearch. Thereby, creating a search experience on your web application. Link to the blog post.

  2. You can use Self Managed App Search, but you need to send the data from your app to it directly.

I'd also want to introduce you to Search-UI which is a open source project and lets you get started easily with creating a Search experience.

Happy to help!

Aravind.

1 Like

Thanks for the information.
Which method will be the most efficient and get real time update changes based on any modifications in MySQL database?

Also for using App search do i need to migrate all the data from MySQL to elastic search ?

I'd choose App Search. App Search follows below Architecture

ES -> App Search Server -> Your App

Search on plain Elasticsearch follows below Architecture

ES-> Your App

In the second case, If you'd want the data to be synced in real time, I'd choose to write data directly using one the clients of Elasticsearch. You can write data to MySQL and ES at the same point.

That being said, App search is a solution built on Elasticsearch itself, either-or you are storing data in Elasticsearch. Just App Search allows you to manage your search experience better.

For more details on App search, please refer the documentation.

Okay Thanks !

Can you provide some example on how should i get started?
Also i found that elastic app search is not yet supported for windows?

We support linux/mac for now.

You can find samples on App Search here & documentation for Self-managed App Search here

I am going by the first method using jdbc input plugin. I have a single database with 15+ tables with different structures and linking. How should i ingest them in elasticsearch with same format and how many indexes must be used?

Kindly raise a different discuss question for that.