Hi there,
I'm building an ecommerce page with elasticsearch, where I will have the main product results and also a "featured products" section.
I want to control the logic over trhe "featured products" section independantly from the main results, so I was thinking that packing it all in one request with the '_msearch' API would be the way to go.
I'm struggling with figuring out how to build my query. It seems the examples are reading input from a file instead of creating it programmatically.
How would I do it in JS? My super noob idea (which is def. not working) is this:
trying to make this query:
{}
{"query" : {"match_all" : {}}}
My attempt:
let query = "{}\n";
query += '{"query" : {"match_all" : {}}}\n';
Any ideas how I would built out the query body in Javascript?
thanks,
Todd DeSantis