I know elasticsearch provides search across multiple indices. But I wonder how it's Inverted Index is constructed(populated) to facilitate this?
What happens at backend is elasticsearch uses wildcard search for that based on conditions you searched for. you can have more detailed information over this link and this link.
About documents, you are getting at first es just send you 10 docs to fasten search. for more details visit this link I have also put an example below.
GET /_search
{
"from" : 0, "size" : 10,
"query" : {
"term" : { "user" : "kimchy" }
}
}