How to use DSL
quinn opened this issue · comments
Quinn Shanahan commented
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.
David Lynam commented
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