Routing Elasticsearch searches from the web

I'm trying to get started with Elasticsearch, but I'm a little confused
about how to actually search from a webpage.

Specifically, I have a Javascript-based web app that's served by node.js on
the backend. I also have some documents indexed in Elasticsearch, and I'd
like to search them from the web app.

I'm not sure how this actually works. Does the search request first go to
my node.js backend, which then executes the search using the Elasticsearch
Javascript client, and then passes ES's response back to the web client? Or
is Elasticsearch queried directly from the page via the RESTful API?

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/902684ba-01b9-4079-a8df-290da21b19e8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.