Para agentes de IA: hay un índice de documentación disponible en https://www.mongodb.com/es/docs/llms.txt — versiones en markdown de todas las páginas están disponibles agregando .md a cualquier ruta URL.

MongoDB\Model\IndexInfo::isGeoHaystack()

Nuevo en la versión 1.4.

Obsoleto desde la versión 1.16: MongoDB 5.0 y posteriores ya no admiten índices geoHaystack.

MongoDB\Model\IndexInfo::isGeoHaystack()

Devuelve si el índice es un índice geoHaystack.

function isGeoHaystack(): boolean

Un valor booleano que indica si el índice es un índice geoHaystack.

<?php $collection = (new MongoDB\Client)->selectCollection('test', 'places'); $collection->createIndex(['pos' => 'geoHaystack', 'x' => 1], ['bucketSize' => 5]); foreach ($collection->listIndexes() as $index) { if ($index->isGeoHaystack()) { printf("%s has bucketSize: %d\n", $index->getName(), $index['bucketSize']); }}

La vista de salida se ilustraría como sigue:

pos_geoHaystack_x_1 has bucketSize: 5