Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

printdeal/PrintdealPandosearchBundle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PrintdealPandosearchBundle build status

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);

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages