printdeal / pandosearch-bundle
Symfony PandosearchBundle
Installs: 5 911
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 8
Forks: 1
Open Issues: 2
Type:symfony-bundle
Requires
- php: ^7.0
- csa/guzzle-bundle: ^2.2|^3.0
- doctrine/collections: ^1.4
- jms/serializer-bundle: ^1.1|^2.0
- symfony/dependency-injection: ^3.3|^4.0
- symfony/expression-language: ^3.3|^4.0
- symfony/framework-bundle: ^3.3|^4.0
- symfony/yaml: ^3.3|^4.0
Requires (Dev)
- pdepend/pdepend: ^2.5
- phploc/phploc: ^4.0
- phpmd/phpmd: ^2.6
- phpstan/phpstan: ^0.9|^0.10
- phpstan/phpstan-phpunit: ^0.9|^0.10.0
- phpunit/phpunit: ^6.1|^7.0
- sebastian/phpcpd: ^3.0|^4.0
- squizlabs/php_codesniffer: ^3.0
- symfony/phpunit-bridge: ^3.3|^4.0
This package is not auto-updated.
Last update: 2022-01-25 08:54:45 UTC
README
About
This bundle integrates Enrise search into your Symfony application.
Prerequisite
Minimal php version is 7
Installation
Add the printdeal/pandosearch-bundle
package to your require
section in the composer.json
file.
$ composer require printdeal/pandosearch-bundle 1.0.0
Add the PrintdealPandosearchBundle to your application's kernel:
<?php public function registerBundles() { $bundles = array( // ... new Printdeal\PandosearchBundle\PrintdealPandosearchBundle(), // ... ); ... }
Usage
Configure the printdeal_pandosearch
in your config.yml
:
printdeal_pandosearch: company_name: 'company.com'
also you can add default parameters for search request:
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:
printdeal_pandosearch: deserialization_parameters: search_response_entity: Printdeal\PandosearchBundle\Entity\Search\CustomResponse suggestion_response_entity: Printdeal\PandosearchBundle\Entity\Suggestion\CustomResponse
In controller you can use your search:
<?php // get search results $searchCriteria = new SearchCriteria(); $searchCriteria->setQuery('searchString'); $this->get('printdeal_pandosearch')->search($searchCriteria); // get search suggestions $suggestCriteria = new SuggestCriteria(); $suggestCriteria->setQuery('searchString'); $this->get('printdeal_pandosearch')->suggest($suggestCriteria);