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

Esengine need to provide a a way to manage derived fields created in querys. #24

Closed
ederfmartins opened this issue Mar 31, 2016 · 1 comment

Comments

@ederfmartins
Copy link
Contributor

When we add a field to a document inside a query, we need a way to use this field in our document model. Any ideias @rochacbruno, @andryw?

  • Use a anotation to emulate derived script_fields as properties.
  • Create a ScriptField that is a field derived from a script_field query
  • Create a ViewDoc that represent a view of the doctype on index
    Questions:
  • How to manage null values generated by a query that select few document fields?
@andryw
Copy link
Contributor

andryw commented Apr 1, 2016

I like the ScriptField solution.
Another solution could be create a intern field "ScriptField" on Document. When the user pass scriptfields on a query, this field (a dict) is filled. This solution is good because it doesn't need to modify the model to create a ScriptField. Sometimes the new field is temporary and it isn't necessary to modify the model for a temporary field. Besides the model could be on a project that you don't have permission to modify.

We will implement both solution and make pull request.

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

2 participants