PHP code example of novactive / ezalgoliasearchengine

1. Go to this page and download the library: Download novactive/ezalgoliasearchengine library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

novactive / ezalgoliasearchengine example snippets


// config\bundles.php

return [
    Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
    ...
    Novactive\Bundle\eZAlgoliaSearchEngine\NovaEzAlgoliaSearchEngine::class => ['all' => true],
];

    $query->setRequestOption('aroundLatLng', '37.7512306, -122.4584587');
    $query->setRequestOption('aroundRadius', 3000);

    $query = $this->searchQueryFactory->create(
        'term',
        'content_type_identifier_s:"article"',
        ['doc_type_s']
    );
    $query->setRequestOption('attributesToRetrieve', ['content_name_s']);

    $query = $this->searchQueryFactory->create(
        '',
        'content_language_codes_ms:"eng-GB"',
    );
    $query->setReplicaByAttribute('location_id_i');