You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# search.py classOrg(DocType):
name=Text(required=True)
state=Keyword()
employee_size_range=Keyword()
revenue_range=Keyword()
lifetime_revenue_range=Keyword()
street_address=Keyword()
city=Keyword()
postal_code=Keyword()
website=Text()
classContact(DocType):
first_name=Keyword()
last_name=Keyword()
job_title=Text()
email=Keyword()
classMeta:
parent=MetaField(type='org')
# create an index and register the doc typesindex=Index(settings.ES_INDEX)
index.settings(number_of_shards=1, number_of_replicas=0)
index.doc_type(Org)
index.doc_type(Contact)
When trying to fill the index with index_data I get elasticsearch.helpers.BulkIndexError with "reason": "routing is required for [stack]/[doc]/[some-document-id]".
which doesn't look right to me! Looks like the Org mapping has been overridden by the Contact mapping.
I've tried adding doc_type='org'doc_type='contact' to the DocType Meta options, but ES 6 does not allow multiple doc types. I assume there is some way to make this work in ES6 but I'm not seeing it. Am I missing something or is this broken for ES6?
The text was updated successfully, but these errors were encountered:
You can no longer have multiple doc types in an index. If you are using the latest elasticsearch-dsl you can make a type of InnerDoc for something you want nested.
I think it is now suggested to only use doc for the document type name.
When trying to fill the index with
index_data
I getelasticsearch.helpers.BulkIndexError
with"reason": "routing is required for [stack]/[doc]/[some-document-id]"
.The created mapping looks like
which doesn't look right to me! Looks like the Org mapping has been overridden by the Contact mapping.
I've tried adding
doc_type='org'
doc_type='contact'
to the DocType Meta options, but ES 6 does not allow multiple doc types. I assume there is some way to make this work in ES6 but I'm not seeing it. Am I missing something or is this broken for ES6?The text was updated successfully, but these errors were encountered: