# Book search, Parent & child mapping multiple author

**URL:** <https://discuss.elastic.co/t/book-search-parent-child-mapping-multiple-author/108223>\
**Category:** Elasticsearch\
**Created:** [November 18, 2017, 6:28am UTC](https://discuss.elastic.co/t/book-search-parent-child-mapping-multiple-author/108223 "2017-11-18T06:28:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![amitava82](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amitava82/32/24411_2.png) [@amitava82](https://discuss.elastic.co/u/amitava82)\
**Post date:** [November 18, 2017, 6:28am UTC](https://discuss.elastic.co/t/book-search-parent-child-mapping-multiple-author/108223/1 "2017-11-18T06:28:12Z")

</div>

Hi, I'm looking at at an example of Parent & child mapping with Book and Author. But how do I design index where a book has multiple authors and I'd like to search for books with certain tags and author.

Desired query:

1. Find authors having name Mark or books having tag Y author X has co worked with. Will return all authors that user has worked with with name Mark or other authors in book with tag Y (not co worked with)
2. Find all the authors with books having tag Y or Author name X
3. Find all authors User has co authored with from publisher penguin

Example book:

```auto
{
 id: 1,
 authors: [1,2],
 tags: ['engineering', 'computer'],
 publisher: 'penguin'
}

```

Example author:

```auto
{
 id: 1,
 name: 'Mark Well'
}

```

Is it something possible with parent child mapping and if not, what would be ideal strategy?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 18, 2017, 7:47am UTC](https://discuss.elastic.co/t/book-search-parent-child-mapping-multiple-author/108223/2 "2017-11-18T07:47:27Z")

</div>

I’d probably index books only and put all the authors details in the book document:

```
{
id: 1,
authors: [{
  id: 1,
  name: 'Mark Well'
  }
],
tags: ['engineering', 'computer'],
publisher: 'penguin'
}
```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 16, 2017, 7:47am UTC](https://discuss.elastic.co/t/book-search-parent-child-mapping-multiple-author/108223/3 "2017-12-16T07:47:51Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
