I need a nodejs class in typescript to interact with elastic search.
1- [login to view URL]: please make sure to include all needed libraries.
2- [login to view URL] please check the attached file:
- Init client with args, you must use "elasticsearch" library
- Insert data with the sent language, take synonyms into account
- Retrieve externalIds related to the data found on the items based on language and query in args, you have to consider synonyms, idioms, tolerance for typos, ... supported languages are English and German
3- unit test file