Returns index names and their aliases. This only returns indices which actually have an alias.
11222
@NotNull
    public Map<String, Set<String>> getIndexNamesAndAliases(String indexPattern) {
        // only request indices matching the name or pattern in `indexPattern` and only get the alias names for each index,
        // not the settings or mappings
        final GetAliases request = new GetAliases.Builder()
                .addIndex(indexPattern)
                // ES 6 changed the "expand_wildcards" default value for the /_alias API from "open" to "all".
                // Since our code expects only open indices to be returned, we have to explicitly set the parameter now.
                .setParameter("expand_wildcards", "open")
                .build();

        final JestResult jestResult = JestUtils.execute(jestClient, request, () -> "Couldn't collect aliases for index pattern " + indexPattern);

        final ImmutableMap.Builder<String, Set<String>> indexAliasesBuilder = ImmutableMap.builder();
        final Iterator<Map.Entry<String, JsonNode>> it = jestResult.getJsonObject().fields();
        while (it.hasNext()) {
            final Map.Entry<String, JsonNode> entry = it.next();
            final String indexName = entry.getKey();
            final JsonNode aliasMetaData = entry.getValue().path("aliases");
            if (aliasMetaData.isObject()) {
                final ImmutableSet<String> aliasNames = ImmutableSet.copyOf(aliasMetaData.fieldNames());
                indexAliasesBuilder.put(indexName, aliasNames);
            }
        }

        return indexAliasesBuilder.build();
    }
1255626
public Map<String, Long> getIndices() {
    if (indicesVersions != null) {
      return indicesVersions;
    }
    Map<String, Long> indicesVersions = Maps.newHashMap();

    Set<String> indices = Sets.newHashSet();
    for (ShardIndexVersion shard : shards) {
      indices.add(shard.getShardRouting().getIndex());
    }

    for (String index : indices) {
      List<ShardIndexVersion> shards = new ArrayList<>();
      for (ShardIndexVersion shard : this.shards) {
        if (shard.getShardRouting().index().equals(index)) {
          shards.add(shard);
        }
      }
      indicesVersions.put(index, this.getIndexVersion(shards));
    }
    this.indicesVersions = indicesVersions;
    return indicesVersions;
  }
1192658
def index_name(self):
        
        fmt = self.campaign.export.elasticsearch.index_name
        fields = dict(date=self.report['date'])
        return fmt.format(**fields).lower()
1080975
def get_index(self, index, type, alias=None, typed=None, read_only=True, kwargs=None):
        
        if kwargs.tjson != None:
            Log.error("used `typed` parameter, not `tjson`")
        if read_only:
            # GET EXACT MATCH, OR ALIAS
            aliases = wrap(self.get_aliases())
            if index in aliases.index:
                pass
            elif index in aliases.alias:
                match = [a for a in aliases if a.alias == index][0]
                kwargs.alias = match.alias
                kwargs.index = match.index
            else:
                Log.error("Can not find index {{index_name}}", index_name=kwargs.index)
            return Index(kwargs=kwargs, cluster=self)
        else:
            # GET BEST MATCH, INCLUDING PROTOTYPE
            best = self.get_best_matching_index(index, alias)
            if not best:
                Log.error("Can not find index {{index_name}}", index_name=kwargs.index)

            if best.alias != None:
                kwargs.alias = best.alias
                kwargs.index = best.index
            elif kwargs.alias == None:
                kwargs.alias = kwargs.index
                kwargs.index = best.index

            return Index(kwargs=kwargs, cluster=self)
1327431
def get_index(self, index, startkey, endkey=None, return_terms=None,
                  max_results=None, continuation=None, timeout=None,
                  term_regex=None):
        
        return self._client.get_index(self, index, startkey, endkey,
                                      return_terms=return_terms,
                                      max_results=max_results,
                                      continuation=continuation,
                                      timeout=timeout, term_regex=term_regex)
8813
def get_closed_indices(self):
        
        state = self.conn.cluster.state()
        status = self.status()

        indices_metadata = set(state['metadata']['indices'].keys())
        indices_status = set(status['indices'].keys())

        return indices_metadata.difference(indices_status)
377076
def get_indexes(self, default_indexes=None):
        
        doctype = self.type.get_mapping_type_name()
        indexes = (settings.ES_INDEXES.get(doctype) or
                   settings.ES_INDEXES['default'])
        if isinstance(indexes, six.string_types):
            indexes = [indexes]
        return super(S, self).get_indexes(default_indexes=indexes)
405588
def getInstNamesByIndex(self, *indices):
        """"""
        instNames = []
        for columnName in self._vars.keys():
            instNames.append(
                self.getInstNameByIndex(*(columnName[-1],) + indices)
            )

        return tuple(instNames)
59433
def retrieve_import_alias_mapping(names_list):
    """"""
    import_alias_names = dict()

    for alias in names_list:
        if alias.asname:
            import_alias_names[alias.asname] = alias.name
    return import_alias_names
912764
def index(self, alias):
        
        clone = self._clone()
        clone._index = alias
        return clone
1102373
def names(self):
        """"""
        if getattr(self, 'key', None) is None:
            result = []
        else:
            result = [self.key]
        if hasattr(self, 'aliases'):
            result.extend(self.aliases)
        return result
1372041
public function getIndexNames($refresh = false)
    {
        if (!isset($this->_indexNames) || $refresh) {
            $this->initIndexesInfo();
        }

        return $this->_indexNames;
    }
689371
def index_list(self):
        '''
        
        '''
        logger.info('Listing indexes')
        _ix = {}
        _i = self.inspector
        for tbl in _i.get_table_names():
            _ix.setdefault(tbl, [])
            for ix in _i.get_indexes(tbl):
                _ix[tbl].append(ix)
        return _ix
601495
def get_ref_indices(self):
        

        ixn_obj = self
        ref_indices = []
        while ixn_obj != ixn_obj.root:
            ref_indices.append(ixn_obj.ref.split(':')[-1])
            ixn_obj = ixn_obj.parent
        return ref_indices[::-1]
1075327
def _get_all_indexes(self):
        """"""
        if self.parser:
            return [v.index for v in self.parser.get_volumes()] + [d.index for d in self.parser.disks]
        else:
            return None
707430
def get_index_names(self, db_name, tbl_name, max_indexes):
    
    self.send_get_index_names(db_name, tbl_name, max_indexes)
    return self.recv_get_index_names()
1186492
@Override
    public int[] getIndices() {
        if (used == indices.length)
            return indices;

        int[] tmpIndices = new int[used];
        for (int i = 0; i < used; i++) {
        	tmpIndices[i] = indices[i];
        }
        return tmpIndices;
    }