public function createGeoIndex($collectionId, array $fields, $geoJson = null)
    {
        $indexOptions = [];

        if ($geoJson) {
            $indexOptions[self::OPTION_GEOJSON] = (bool) $geoJson;
        }

        return $this->index($collectionId, self::OPTION_GEO_INDEX, $fields, null, $indexOptions);
    }
public function createGeoIndex($collectionId, array $fields, $geoJson = null)
    {
        $indexOptions = [];

        if ($geoJson) {
            $indexOptions[self::OPTION_GEOJSON] = (bool) $geoJson;
        }

        return $this->index($collectionId, self::OPTION_GEO_INDEX, $fields, null, $indexOptions);
    }
public function createGeoIndex ( $ collectionId , array $ fields , $ geoJson = null ) { $ indexOptions = [ ] ; if ( $ geoJson ) { $ indexOptions [ self :: OPTION_GEOJSON ] = ( bool ) $ geoJson ; } return $ this -> index ( $ collectionId , self :: OPTION_GEO_INDEX , $ fields , null , $ indexOptions ) ; }
Create a geo index

@param string  $collectionId - the collection id
@param array   $fields       - an array of fields
@param boolean $geoJson      - whether to use geoJson or not

@link https://docs.arangodb.com/HTTP/Indexes/Geo.html

@return array - server response of the created index
@throws \ArangoDBClient\Exception
Create a geo index