You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to figure out how to initialize an instance of Elasticsearch::DSL::Search::Search from a hash, pretty much a complete reverse of to_hash. The idea is to take the json query provided by the user, convert it to hash, instantiate a Search, and enrich it with some additional clauses and options before issuing a request to Elasticsearch. Of course, I could update the user's hash, but being able to use the DSL seems so much nicer and a lot less clunky - if only it worked. It looks like currently this use case is unsupported - the purpose of this library is to go from Ruby DSL to Elasticsearch hashes, not backwards. However, I can't help wondering if perhaps other people ran into the same problem. Can you offer any help / advice?
Thank you.
The text was updated successfully, but these errors were encountered:
Hi,
I'm trying to figure out how to initialize an instance of
Elasticsearch::DSL::Search::Search
from a hash, pretty much a complete reverse ofto_hash
. The idea is to take the json query provided by the user, convert it to hash, instantiate aSearch
, and enrich it with some additional clauses and options before issuing a request to Elasticsearch. Of course, I could update the user's hash, but being able to use the DSL seems so much nicer and a lot less clunky - if only it worked. It looks like currently this use case is unsupported - the purpose of this library is to go from Ruby DSL to Elasticsearch hashes, not backwards. However, I can't help wondering if perhaps other people ran into the same problem. Can you offer any help / advice?Thank you.
The text was updated successfully, but these errors were encountered: