'in' condition in elastic search

When i do a regex search, i am getting back list of files.. say 10.

my requirement is to do the next search with in that 10 files only. is there a way we can do this is in elastic search.
please suggest.

Depending on what you exactly need, this might be impossible as it would require to perform a JOIN. Can you give a concrete example about what documents look like and how you want to search them?

i think my question creates a confusion.

let me put it this way.
i want to search a text, example "RUNIN" , with in only some 5 files (which i can input).

text to be searched : "RUNIN"
files: file1,file2,file3,file4,file5.

ideally the result should contain results only from those 5 files. how can i construct a query for this.