Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove DSL, and use only elixir structures. #240

Open
OpakAlex opened this issue Aug 16, 2016 · 5 comments
Open

Remove DSL, and use only elixir structures. #240

OpakAlex opened this issue Aug 16, 2016 · 5 comments

Comments

@OpakAlex
Copy link
Collaborator

No description provided.

@OpakAlex
Copy link
Collaborator Author

Extract dsl to new library tirexs-dsl

@dfcarpenter
Copy link

I'm newish to elixir but have been using this library at work and would like to contribute. Could you give me a quick example of what you mean be using plain elixir structures instead of macros?

@OpakAlex
Copy link
Collaborator Author

json it's so easy format, like:
query: {term: 'a'} => [query: [term: 'a']]
So i think we can remove all macroses and just do this.

@Qqwy
Copy link

Qqwy commented Apr 8, 2017

One problem the current macros have, is that it is impossible to include if statements or for list comprehensions in them. This makes it impossible to e.g. only add a filter if some condition is true, or write out a list of terms to match (which is not the same as using an ElasticSearch terms query).

@Qqwy
Copy link

Qqwy commented Apr 8, 2017

I don't think this feature is really necessary, because Tirexs already happily works when you give it a map or a keyword list. So you can create the Elixir equivalent of any of the JSON-examples, and Tirexs will be able to use this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants