Searching mutliple indexes with fields?


We are a database look up company. Meaning we A LOT of databases. However, when we first started we thought doing a query to MySQL would be enough. That wasn't the case so we have moved to Elasticsearch. In MySQL, we put all the databases into one database and separated them into tables. So database1 would have its own table and so on. We have imported around 3 tables at this time for testing. When searching all the indexes the speed is impressive but not enough. However, we have the option on our search engine to search for a "username", "email", and "ip". All of the tables has simliar columns. So if database1 has a username column is has "Username" and so on. The spelling is all the same due to this. However some indexes do not have the "Username" function. We were wondering when we send a search request to the API, if we could search all indexes in the "Username" column for a string. So if a user searches "Admin" it would search all indexes that has the column "Username", however we would like to do this by using "localhost:9300/_all/" instead of specifiying which indexes because we would have over 500.

Thank you! Any suggestions are welcome.

Take a read of


We have tried that and we don't get any results but this.

{ "took": 18, "timed_out": false, "_shards": { "total": 20, "successful": 20, "failed": 0 }, "hits": { "total": 0, "max_score": null, "hits": [] } }

Providing the query you ran would be helpful.

I will mark this as solved.
For future readers I will explain how I did it.

I was reading the doucmentatry for 2.3 and I noticed that one of the documents said
"GET /megacorp/employee/_search?q=last_name:Smith" as a example and the result was that it searched teh field "lastName" for smith. So I just simply executed
"GET /_all/_search?" and I got the results correctly.

I hope this helps someone and I would really reccomend reading the guide even though it's long it is very helpful.

Thank you!