-
Notifications
You must be signed in to change notification settings - Fork 800
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
Move _expand__to_dot's default value to a variable #498
Comments
How would you feel about moving the This would allow people to write I am not excited about either solution, but I agree that the current situation is not ideal. Thanks! |
I recently changed the logic to ignore the double underscores when working with raw dicts so you can always do Apologies for taking such long time! |
I also merged the PR since it doesn't really hurt anything and if it makes your life easier. Again my apologies for the delay! |
@honzakral sure, I've been using a workaround in the meantime.
That's a great suggestion! Was it implemented already or should I make another PR for that? BTW. Could you please merge this changes to 2.x as well? #809 I'm currently working with older ES version and reimplementing a bigger part of code and I'd rather to use this solution instead of the workaround this time. |
In DslBase the expand__to_dot variable is by default set to True.
It's troublesome in mappings like mine, where I'm using double underscores regurarly in field names and it would be much easier to just set the default value once and forget about it.
Plus, after creating a query that had it set to False it's hard to use your operands on queries as they're just creating a new one with no option to pass that param.
What's more, even after joining queries 'manually' I can't run them since assignment of a query to Search's query is done by ProxyDescriptor that - in effect - makes it impossible to use your library with field names like mine.
If I'm wrong and I am actually able to run such a query from the Search class - how can I do it? And even if I can; I'd still very much prefer to set the variable once and forget about it instead of passing it each time.
The text was updated successfully, but these errors were encountered: