简体   繁体   中英

Nodejs/Vuejs implementing Elasticsearch

I am new to Elasticsearch and also confused how do I actually start implementing it. I have developed an office management software where on a daily basis tasks and other information based to that task belonging to a specific clients are stored. I have written API's in nodejs and the front-end in vuejs and MySQL db is used. So I want to implement a search functionality using Elasticsearch wherein user can search the tasks with any parameters they would like to.

Listed below are some of my questions

  1. Now do Elasticsearch will work as an another db. If so, then how do I keep the record updated in Elasticsearch db as well.
  2. Would it effect the efficiency in any way.
  3. Also what is kibana and logstash in simple terms.
  4. Is implementing Elasticsearch on client side is a good idea? Is Yes, then how can I implement Elasticsearch and kibana using vuejs?

I am confused with all the above things, can anyone kindly share their knowledge on the above listed questions and also tell which articles/docs/videos should I refer for implementing Elasticsearch in the best possible way?

Elasticsearch

  • It is a data store, all the JSON data will(Single Record/Row) be stored in indexes(Tables)

  • Update the records in elasticsearch using your backend only, even though we have packages available to connect the frontend to Elasticsearch.

  • Efficiency, nothing gets affected except the new stack in your application.

  • Implementing elasticsearch on the client-side is not a recommended option, Same code same API can be used till your MySQL DB connection, add a function to save update any data along with MySQL save call.

     Example: MySQLConfig.SaveStudent(student) ElasticsearchConfig.SaveStudent(student) Till here there is no code change needed to save/update/delete/getByPrimaryID/GetByParamSearch, For `getByPrimaryID/GetByParamSearch` search, you have to create a different API either to elasticsearch to MySQL but not both.

Kibana

GUI for your Elasticsearch - Look at it like dbForge Studio, MySQL Workbench, phpMyAdmin

Other than GUI it has a lot of other functionalities like cluster monitoring, all the elastic stack monitoring, analytics, and so on.

Logstash

It ships many files and save it into elasticsearch index, this is not needed until u need it for use cases like

  • application-prod.log to searchable index
  • Kafka topic to searchable index
  • MySQL Table to searchable index
  • Huge list of use-cases available to ship anything and make it a searchable index

To understand clearly about index, mappings, document in elasticsearch vs database, table, scheme, record in MySQL read from here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM