When creating the mappings for an index that can search through multiple books, is it preferable to use nested mappings like below, or using documents with a parent-child relati
nested is basically a way of stuffing everything into the same document. That can be useful for searching, but it makes certain things considerably harder.
Like - for example - if you're trying to find a particular chapter section - your query will return the correct document - the whole book. I would imagine that's probably not what you're looking for, and thus a parent/child
relationship would be the appropriate way to go.
Or just don't bother, and treat book/chapter/section as separate types within an index which query and 'join' on demand.