elastic / elasticsearch-dsl-ruby

Ruby API for the Elasticsearch Query DSL

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to use DSL

quinn opened this issue · comments

all of the examples show mixing it into the global scope, which in practice no would would ever do. How do I use the DSL with rails / models, which is probably the typical use-case? all of the rails examples show passing a hash into SomeModel.search({}). In all my searching, I failed to find a concise example that used both elasticsearch-model/rails and elasticsearch-dsl.

I am wondering this as well. The search API allows for specifying a target (Ex: GET /my-index-000001/_search). Is something like that possible with the DSL?

https://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html