Adding search bar to my web application

I have a single database with 20+ tables in MySQL with different structures and linking. How should I ingest them in elasticsearch with the same format and how many indexes must be used?

I'd totally forget about the existing model and would just think about the usage to build the right "search" objects for my use case.
Here I can't really answer as I don't know the use case.

Basically I'd recommend to ask yourself 2 questions:

  • What kind of objects my users want to get back as a response? If it's object X, then just index object X
  • What typical attributes my users want to search for? Let say I need attribute a, b and c, just index those attributes within object X whatever the original source of those attributes is.

Also I shared most of my thoughts there: http://david.pilato.fr/blog/2015/05/09/advanced-search-for-your-legacy-application/

Basically, I'd recommend modifying the application layer if possible and send data to elasticsearch in the same "transaction" as you are sending your data to the database.

Then if it's for a search bar, I'd also look at AppSearch.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.