is there a way to include the _meta data of an index when doing a search on multiple indices?
In my case I have lots of indices which makes it kind of hard to provide them for a search on "Multiple Indices" and also using wildcard to narrow down the indices is not option.
However I could provide meta data for each index, such as {"visible" : true}.
With that said, back to my question.. is there a way to make use of _meta data when searching indices?
@Christian_Dahlqvist
and my question is, when I'm adding data there in the meta data, can I make use of it when doing a search for documents on all indices?
that's to bad is there any other way to archive a single search on a great number of indices, without having to name them? (wildcards won't do I'm affraid )
I don't understand the relationship between the original question and this question:
is there any other way to archive a single search on a great number of indices
wildcards won't do I'm affraid
Searching for
GET foo*/_search
is fine.
It's unclear to me what you are trying to achieve here.
Could you provide a full recreation script as described in About the Elasticsearch category. It will help to better understand what you are doing. Please, try to keep the example as simple as possible.
A full reproduction script will help readers to understand, reproduce and if needed fix your problem. It will also most likely help to get a faster answer.
@dadoonet sorry, english is not my mother tongue.. I mean that I can't use wildcards in my case, because there is not a pattern that I can apply.. for instance I have a list of indices, such as
contracts
plans
notes
..and way more..
lots of these indices are "public" (this information is stored in _meta data at the moment)
but a few indices are private (in relation "a few".. they're still quite a lot of them)
.. and what I want to do/archive is to do a search on all "public" indices.
@Christian_Dahlqvist thank you for mentioning aliases. It looks like that I can do exactly what I want.
If I understood it correctly, then I could create an alias called "public" and just add all my "public" indices to it.. and when I want to search on all "public" indices, then I'll just have to call
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.