Reading from specific index under alias

Hello!
I have different indices named myindex-. Every night a new index is created(with a different number), so we use an alias(myalias) to keep track of the index that contains the most recent documents. Under that alias there are also other indices with different structure, so I need just myindex-.
I use es-hadoop to query and right now my code looks like this:


spark.read.format("org.elasticsearch.spark.sql")
    .option(...).load(myalias?q=_index:myindex-*)

I think there should be a way to ready directly from that index(under the alias), without filtering. Do you have any idea? Thank you!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.