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

got an unexpected keyword argument 'data_only #1122

Closed
littlehome-eugene opened this issue Feb 18, 2019 · 1 comment
Closed

got an unexpected keyword argument 'data_only #1122

littlehome-eugene opened this issue Feb 18, 2019 · 1 comment

Comments

@littlehome-eugene
Copy link

#936
I'm copying the question here, because the issue is closed and not sure if it will be noticed..

elasticsearch==6.3.1
elasticsearch-dsl==6.3.1

 class ReviewMeta(InnerDoc):

     id = Integer()
     name = Keyword()
     tags = Keyword()
     location = GeoPoint()
     area_names = Keyword()


 class ReviewMetaSearchClickLogDoc(DocType):

     id = Integer()
     created_at = Date()
     search_log_id = Integer()
     review_meta = Object(ReviewMeta)
     position = Integer()

     class Index:
         name = REVIEWMETA_SEARCH_CLICK_LOG_INDEX


 class ReviewMetaSearchLogDoc(DocType):

     id = Integer()
     created_at = Date()
     user = Object(User)
     result_count = Integer()
     search_data = Object(dynamic=True)
     clicks = Nested(ReviewMetaSearchClickLogDoc, include_in_parent=True)

     class Index:
         name = REVIEWMETA_SEARCH_LOG_INDEX

I guess the problem is Nested(ReviewMetaSearchClickLogDoc, include_in_parent=True) , why is it a problametic, and how can I fix it?

@honzakral
Copy link
Contributor

ReviewMetaSearchClickLogDoc should be extending InnerDoc instead of DocType since it is not a standalone document, just used in Nested field. Same like ReviewMeta.

Hope this helps!

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

No branches or pull requests

2 participants