What is the difference in specifying the index in the URL with specifying the index in the query body?

I want to undenstand the performance diference between:

GET /_search

{
     "query": {
         "terms": {
             "_index": ["index_1", "index_2"] 
           }
      }
}

and:

GET index_1,index_2/_search

I have no idea but I'd definitely use the later.

My problem consist in the limit of the URL that is 4096 bytes, I have to much indexes and I want to limit the number of shards that query touch.

Did you consider using aliases?