@param string $indexId
@param string $key

@return mixed|null

@throws InvalidMapIndex
334902
public function getBy(string $indexId, string $key)
    {
        if (!isset($this->indexes[$indexId])) {
            throw new InvalidMapIndex($indexId);
        }

        return $this->get($this->indexes[$indexId]->get($key));
    }
458299
public function useKeyAsIndexAttribute($key, $normalize = false)
    {
        if (null === $key) {
            $this->indexAttrKey = null;
            return;
        }

        if (true !== $normalize && !$this->isValidNodeName($key)) {
            throw new \InvalidArgumentException(sprintf('%s is an invalid attribute name', $key));
        }

        $this->indexAttrKey = $normalize ? $this->normalizer->normalize($key) : $key;
    }
966702
private function parseKey($data, $key)
    {
        if (isset($data[$key])) {
            $value = (int) $data[$key];
            $this->scoreTiers []= new ScoreTier($key, $value);
            return $value;
        }

        throw new InvalidDataException();
    }
276115
public function forget($key, $index_name = null)
	{
		list($index_name, $key) = $this->normalizeAccessKey($key, $index_name);

		if ($this->has($key, $index_name)) {
			unset($this->items[$index_name][$key]);
		}
	}
474688
public function hasKey($key)
    {
        if (!is_string($key) && !is_int($key)) {
            throw new InvalidIntOrStringException('key', $key);
        }

        if (!is_array($this->value)) {
            throw new InvalidArrayException($this->name, $this->value);
        }

        if (!array_key_exists($key, $this->value)) {
            throw new ArrayKeyNotExistsException($this->name, $key);
        }

        return $this;
    }
894387
public function getCustomValue($key)
    {
        if (!array_key_exists($key, $this->customValues)) {
            throw InvalidPayloadException::notExistingCustomValue($key);
        }

        return $this->customValues[$key];
    }
64468
public function delete($indexName, $type, $id)
	{
		$index = $this->elasticSearcher->indicesManager()->getRegistered($indexName);

		$params = [
			'index' => $index->getInternalName(),
			'type'  => $type,
			'id'    => $id
		];

		return $this->elasticSearcher->getClient()->delete($params);
	}
1144839
public function deleteIndex($keys)
    {
        if (is_string($keys)) {
            $indexName = $keys;
            if (! preg_match('#_-?1$#', $indexName)) {
                $indexName .= '_1';
            }
        } elseif (is_array($keys)) {
            $indexName = \MongoDB\generate_index_name($keys);
        } else {
            throw new \InvalidArgumentException();
        }

        try {
            return TypeConverter::toLegacy($this->collection->dropIndex($indexName));
        } catch (\MongoDB\Driver\Exception\Exception $e) {
            return ExceptionConverter::toResultArray($e) + ['nIndexesWas' => count($this->getIndexInfo())];
        }
    }
827734
public function getParameter($key) {
    if (is_string($key)) {
      return $this->getParameterByName($key);
    }
    elseif (is_integer($key)) {
      return $this->getParameterAtIndex($key);
    }
    else {
      throw new \InvalidArgumentException("Illegal parameter index {$key}.");
    }
  }
1280619
@Override
  public List<String> indexKeys(String indexName, String indexKey) {
    lock.lock();
    try {
      if (!this.indexers.containsKey(indexName)) {
        throw new IllegalArgumentException(String.format("index %s doesn't exist!", indexName));
      }
      Map<String, Set<String>> index = this.indices.get(indexName);
      Set<String> set = index.get(indexKey);
      List<String> keys = new ArrayList<>(set.size());
      for (String key : set) {
        keys.add(key);
      }
      return keys;
    } finally {
      lock.unlock();
    }
  }
357856
protected function preExecuteAction($key, $index, $args)
    {
        $executedCount = 0;
        switch ($key) {
            case self::ADD:
                $id = $args[0];
                if ($id && $this->rawLayoutBuilder->has($id)) {
                    $executedCount += $this->executeDependedRemoveAction($index, $id);
                }
                break;
        }

        return $executedCount;
    }
997458
public function getMapByIndex($index)
    {
        $map = array_slice($this->maps, (int) $index, 1, false);

        return end($map);
    }
245096
public function get($key)
    {
        if (!$this->offsetExists($key)) {
            throw new InvalidArgumentException(sprintf('Identifier "%s" is not defined.', $key));
        }
        return $this->offsetGet($key);
    }
213756
public function __column(string $column, string $index_key = null):array{
		return array_column($this->__toArray(), $column, $index_key);
	}
316478
public function getIndex($collection, $indexId)
    {
        $url      = UrlHelper::buildUrl(Urls::URL_INDEX, [$collection, $indexId]);
        $response = $this->getConnection()->get($url);

        return $response->getJson();
    }
388389
public function getError($key, $index = null, $group = null)
    {
        return $this->validator->getError($key, $index, $group);
    }
768685
protected function getMappedKeyIndex($mappedKey, $key)
    {
        $startSize = strlen($this->getStartMapDelimiter()) - 1;
        $key = substr($key, $startSize, strrpos($key, $this->getEndMapDelimiter())-$startSize);
        return substr($mappedKey, strlen($key . self::MAPPED_KEY_SEPARATOR));
    }