Check if an index exists in ES

@param indexName
@return true if the index exists or false if the index does not exits.
772366
public boolean indexExists(String indexName) {
        return this.client.admin().indices().prepareExists(indexName).execute().actionGet().isExists();
    }
1255541
private boolean checkElementName(final Node node) {
        return TOPIC_INDEXTERM.matches(node)
                || INDEXING_D_INDEX_SORT_AS.matches(node)
                || INDEXING_D_INDEX_SEE.matches(node)
                || INDEXING_D_INDEX_SEE_ALSO.matches(node);
    }
1313898
public function hasIndex($indexName)
    {
        $indexName = $this->normalizeIdentifier($indexName);

        return isset($this->_indexes[$indexName]);
    }
883861
public boolean hasColumn(String columnName) {
        Integer idx = columnNamesIndex.get(columnName);
        return idx != null;
    }
1127825
public boolean hasNext() {
        if (currentIndex == endIndex) {
            return false;
        }
              
        // Otherwise, see if nextElement is null. If so, try to load the next
        // element to make sure it exists.
        if (nextElement == null) {
            nextElement = getNextElement();
            if (nextElement == null) {
                return false;
            }
        }
        return true;
    }
921063
@Override
    public boolean has(int index, Scriptable start)
    {
        if (externalData != null) {
            return (index < externalData.getArrayLength());
        }
        return null != slotMap.query(null, index);
    }
850093
public function offsetExists($index)
    {
        if (!$exists = parent::offsetExists($index)) {
            if (isset($this->{$index})) {
                return true;
            }
        }
        return $exists;
    }
928345
def exists(self, index):
        
        data = self.data
        try:
            for c in self._split(index):
                i = int(c) - 1
                data = data[i][4]
        except Exception:
            return False
        return True
428378
public function hasIndex($indexName, $tableName)
    {
        $result = false;

        foreach ($this->getIndices($tableName) as $index) {
            if ($indexName === $index['Column_name']) {
                $result = true;
            }
        }

        return $result;
    }
1066589
public function hasIndex($name)
    {
        $indexes = $this->getIndexes();

        foreach ($indexes as $index) {
            if ($index->Key_name == $name) {
                return true;
            }
        }

        return false;
    }
913520
public <V> boolean contains(IndexDefinition<T, V> indexDefinition, V value) {
    FieldIndex<T, V> index = (FieldIndex<T, V>) mIndices.get(indexDefinition);
    if (index == null) {
      throw new IllegalStateException("the given index isn't defined for this IndexedSet");
    }
    return index.containsField(value);
  }
145110
protected boolean isIncludedInNodeIndex(InternalQName propertyName)
   {
      if (indexingConfig == null)
      {
         return true;
      }
      else
      {
         return indexingConfig.isIncludedInNodeScopeIndex(node, propertyName);
      }
   }
1003698
public static boolean isIndexExist(RestClient client, String index) throws Exception {
		Response response = client.performRequest(new Request("HEAD", "/" + index));
		return response.getStatusLine().getStatusCode() == 200;
	}
704730
public Boolean hasIndex() {

        Boolean hasIndex = false;
        if (this.indexedFastaSequenceFile != null) {
            hasIndex = this.indexedFastaSequenceFile.isIndexed();
        }
        return hasIndex;
    }
1338810
public boolean isExistsType(String indexName, String indexType) {
        TypesExistsResponse response =
                getClient().admin().indices()
                        .typesExists(new TypesExistsRequest(new String[]{indexName}, indexType)
                        ).actionGet();
        return response.isExists();
    }
285055
private function exists($index)
    {
        return isset($this->elements[$index]) || array_key_exists($index, $this->elements);
    }
145496
public boolean existsMapping(String indexName, String mappingName) {
        ClusterStateResponse resp = this.client.admin().cluster().prepareState().execute().actionGet();

        if (resp.getState().getMetaData().index(indexName) == null) {
            return false;
        }
        ImmutableOpenMap<String, MappingMetaData> mappings = resp.getState().getMetaData().index(indexName).getMappings();

        if (mappings.get(mappingName) != null) {
            return true;
        }
        return false;
    }