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:
- 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)
- Find all the authors with books having tag Y or Author name X
- Find all authors User has co authored with from publisher penguin
Example book:
{
id: 1,
authors: [1,2],
tags: ['engineering', 'computer'],
publisher: 'penguin'
}
Example author:
{
id: 1,
name: 'Mark Well'
}
Is it something possible with parent child mapping and if not, what would be ideal strategy?