How and when does the working set get stored in Memory?

HI there,

this might be a stupid question but i can’t find a definitive answer documented anywhere.

Can you tell me how and when does the working set get stored in Memory?

For instance, when i create an index, does all the docs with that indexed field get stored in memory automatically at that moment?

And how does the other working set data get added to memory?

Thanks
Peter