2017 © Pedro Peláez
 

symfony-bundle pandosearch-bundle

Symfony PandosearchBundle

image

printdeal/pandosearch-bundle

Symfony PandosearchBundle

  • Tuesday, July 31, 2018
  • by tomnijboer
  • Repository
  • 7 Watchers
  • 0 Stars
  • 4,455 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 19 Versions
  • 9 % Grown

The README.md

PrintdealPandosearchBundle build status

About

This bundle integrates Enrise search into your Symfony application., (*1)

Prerequisite

Minimal php version is 7, (*2)

Installation

Add the printdeal/pandosearch-bundle package to your require section in the composer.json file., (*3)

``` bash $ composer require printdeal/pandosearch-bundle 1.0.0, (*4)


Add the PrintdealPandosearchBundle to your application's kernel: ``` php <?php public function registerBundles() { $bundles = array( // ... new Printdeal\PandosearchBundle\PrintdealPandosearchBundle(), // ... ); ... }

Usage

Configure the printdeal_pandosearch in your config.yml:, (*5)

``` yaml printdeal_pandosearch: company_name: 'company.com', (*6)


also you can add default parameters for search request: ``` yaml printdeal_pandosearch: company_name: 'company.com' query_settings: track: false full: true nocorrect: true notiming: true

for more convenience - optional parameter with a custom entity for deserialization can be used:, (*7)

yaml printdeal_pandosearch: deserialization_parameters: search_response_entity: Printdeal\PandosearchBundle\Entity\Search\CustomResponse suggestion_response_entity: Printdeal\PandosearchBundle\Entity\Suggestion\CustomResponse, (*8)

In controller you can use your search:, (*9)

``` php <?php // get search results $searchCriteria = new SearchCriteria(); $searchCriteria->setQuery('searchString'); $this->get('printdeal_pandosearch')->search($searchCriteria);, (*10)

// get search suggestions $suggestCriteria = new SuggestCriteria(); $suggestCriteria->setQuery('searchString'); $this->get('printdeal_pandosearch')->suggest($suggestCriteria); ```, (*11)

The Versions