-
Notifications
You must be signed in to change notification settings - Fork 802
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
Elasticsearch attribute name different from Python name #1345
Comments
I just noticed that there is an even better reason for needing this. I currently have an ElasticSearch index with a mapping that I do not want to change (to expensive to reindex). Here class BlogPost(Document):
from = Keyword() The conventional way of having it as a class attribute fails because |
It seems that you could use an attribute |
I'm not sure whether this does what I need it to do. Would you mind to provide some short example code? |
Also mentioned in #1659 |
Closing this one, since it is a duplicate of #1659 |
Hi, I currently have a document definition similar to the following:
However, my code style dictates that I avoid shadowing Python-interals, such as type() here.
Therefore, I'd like to change the name of the class attribute without changing the name in the Elasticsearch mapping. I'm thinking of syntax similar to the following:
Is something like this supported?
The text was updated successfully, but these errors were encountered: