Nested mappings and searches - does the nesting have to be in one document

I come from an RDBMS background; please forgive.

I have the following two data structures, pubs and authors:

pubs:

{
    "_id": "WP138",
    "title": "Practical Insights for School Leaders",
    ...
    "authors": ["/pubs/authors/s/stecher_brian_m",
                        "/pubs/authors/h/hamilton_laura_s",
                       "/pubs/authors/g/gonzalez_gabriella_c"],
     ...
}

authors:

{
    "_id":"/pubs/authors/s/stecher_brian_m",
    "fname": "Brian",
     "lname": "Stecher",
    ...
}

I'd like to be able to query the publications authored by Brian and vis-versa, the authors that have published on topics of "School Leaders".

In reading about nested and parent-child relations, i believe nested is the preferred way to go as parent-child is only for one-to-many rather than many-to-many unless I read that wrong.

Question - is it possible to do nesting across indices? I can script something that would inject the authors structure into the pubs just fine and then define the nested mapping. I ask because I ultimately will be "joining" up another 1/2 dozen different data sources to ask a series of compound questions and would rather not create one massive document that is totally denormalized.

My ultimate goal is to make a simple Kibana interface people can use to query rather than a custom application. I say this because i understand another approach is to create the subqueries in code.

What are my best options?

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