I'm trying to write a js client to query my ES indexes. I'm looking for some working examples and instructions on how to install the required parts to make this work. What I've tried so far is not working. I already have ES indexes to use so I just need help with my js client.
The following code is straight from some examples that I've seen. I keep getting errors like the following but I'm not really sure what to do with this since I can't find any examples using require([]). I'm rather new to JS so my problems could be rather simple.
Error:
SCRIPT5022: Module name "scripts/elasticsearch" has not been loaded yet for context: _. Use require([]) http://requirejs.org/docs/errors.html#notloaded1
I have a dir structure like
../ESIntegration
ESIntegration.js
/scripts
elasticsearch.js
require.js
Code: