Returns true if a index exists.

@return bool
979401
private function needsIndex()
    {
        return 1 < count($this->sitemapProviderPool->getProviders())
        || 1 < array_reduce(
            $this->sitemapProviderPool->getIndex(),
            function($v1, Sitemap $v2) {
                return $v1 + $v2->getMaxPage();
            }
        );
    }
1002693
public function has($index = null)
	{
		try
		{
			if ($this->toArray())
			{
				if ($index === null)
				{
					return true;
				}

				return $this->hasProperty($index);
			}
		}
		catch (\Exception $exc)
		{

		}

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

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

        return false;
    }
1095154
public function isIndexed()
    {
        $fields = $this->getFieldsInQuery();
        foreach ($fields as $field) {
            if ( ! $this->collection->isFieldIndexed($field)) {
                return false;
            }
        }
        return true;
    }
1305216
public boolean exists(String index) {
        boolean exists = false;

        if (indexNames.isEmpty() == false) {
            for (i = 0; i < indexNames.size(); i++) {
                if (index.equals((String) indexNames.elementAt(i))) {
                    exists = true;
                    break;
                }
            }
        }

        return exists;
    }
283372
def index_exists(engine: Engine, tablename: str, indexname: str) -> bool:
    
    insp = Inspector.from_engine(engine)
    return any(i['name'] == indexname for i in insp.get_indexes(tablename))
347664
public function offsetExists($index)
    {
        $index = (int)$index;

        if ($index >= 0) return ($this->getLength() > $index);

        return ($this->getLength() >= abs($index));
    }
1045872
def index_exists(index, hosts=None, profile=None):
    '''
    
    '''
    es = _get_instance(hosts, profile)

    try:
        return es.indices.exists(index=index)
    except elasticsearch.exceptions.NotFoundError:
        return False
    except elasticsearch.TransportError as e:
        raise CommandExecutionError("Cannot retrieve index {0}, server returned code {1} with message {2}".format(index, e.status_code, e.error))
772366
public boolean indexExists(String indexName) {
        return this.client.admin().indices().prepareExists(indexName).execute().actionGet().isExists();
    }
147287
public function exists(): bool
    {
        if ($this->caching == false) {
            return file_exists($this->getAbsoluteFilePath());
        }

        if ($this->exists == null) {
            $this->exists = file_exists($this->getAbsoluteFilePath());
        }

        return $this->exists;
    }
405769
public function aliasExists($alias)
    {
        $index_prefix = Config::get('larasearch.elasticsearch.index_prefix', '');
        if ($index_prefix && !Str::startsWith($alias, $index_prefix)) $alias = $index_prefix . $alias;

        return self::getClient()->indices()->existsAlias(['name' => $alias]);
    }
787210
public static function exists() : bool
    {
        // Start session if needed
        if (! session_id()) {
            Session::start();
        }

        // Loop all arguments
        foreach (func_get_args() as $argument) {

            // Array element
            if (is_array($argument)) {

                // Loop the keys
                foreach ($argument as $key) {

                    // Does NOT exist
                    if (! isset($_SESSION[(string) $key])) {
                        return false;
                    }
                }
            } else {

                // Does NOT exist
                if (! isset($_SESSION[(string) $argument])) {
                    return false;
                }
            }
        }

        return true;
    }
741989
public boolean isExists(String index) {
        IndicesExistsRequestBuilder indicesExistsRequestBuilder =
                admin().indices().prepareExists(index);
        return JMElasticsearchUtil
                .logRequestQueryAndReturn("isExists",
                        indicesExistsRequestBuilder,
                        indicesExistsRequestBuilder.execute())
                .isExists();
    }
904558
public function isExist()
    {
        $this->mustBeDataModel();

        if ($this->isLoaded()) {
            return  true;
        }

        return (bool)$this->find([
            'where' => $this->pkvAsWhere()
        ])->fetchCount();
    }
572046
public function hasIndex($index, $collection)
    {
        if (empty($this->queriesResultCache[ 'collectionIndexes' ][ $collection ])) {
            $this->getIndexes($collection);
        }

        return (bool)in_array($index, $this->queriesResultCache[ 'collectionIndexes' ][ $collection ]);
    }
540885
public function exists($index)
    {
        $request = $this->createRequestInstance(self::INDEX_EXIST, $index, null);

        try {
            $this->client->send($request);
        } catch (ClientException $exception) {
            return false;
        }

        return true;
    }
564673
def index_exists(self, table: str, indexname: str) -> bool:
        """"""
        # MySQL:
        sql = ("SELECT COUNT(*) FROM information_schema.statistics"
               " WHERE table_name=? AND index_name=?")
        row = self.fetchone(sql, table, indexname)
        return True if row[0] >= 1 else False