Reputation: 17184
I have two mapping (User and Tasks) and when I search for tasks, I want to able to get found tasks with user information with it.
user:
mappings:
name: ~
pic: ~
tasks:
mappings:
content: ~
created: ~
user: integer <-- ID is stored
How can I share types / model
across each other, so when I pull found task, it should also pull the user info with it.
Upvotes: 0
Views: 32
Reputation: 6311
Elasticsearch doesn't provide a native way to 'join' doc_types. Some options:
Save the user data inside the tasks doc_type (1 query)
tasks:
mappings:
content: ~
created: ~
user:
name:
pic:
Upvotes: 1