Download the PHP package manugarciaes/easy-search-bundle without Composer

On this page you can find all versions of the php package manugarciaes/easy-search-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package easy-search-bundle

SearchBundle for ElasticaBundle

1) You need Fos Elastica Bundle installed and configurated 2) Add SearchBundle to your appKernel

$bundles = array(
[..]
    new manugarciaes\SearchBundle\SearchBundle(),
);

3) Change your Fos Elastica Bundle configuration, using as repository the next one

 persistence:
    [..]
    repository: manugarciaes\SearchBundle\Repository\SearchRepository

4) Create a new service using the Easy Search Service like next example:

If you want Add Filters

1) create a new service with Easy Search Filter Object

    ## FILTER EXAMPLE
    elastic.search.filter.enabled:
      class: SearchBundle\Filter\ObjectFilter
      calls:
            - [setField, ['enabled']]
            - [setValue, [true]]

If you want a dynamic value you can use for example a service or something like this:

   - [setValue, ["@=service('request_stack').getMasterRequest.get('enabled')"]]

With this your filter change the value using the request

2) Add this filter to your Search Service

  ##  EXAMPLE
  article.search:
    class: SearchBundle\Services\SearchService
    arguments:
      - "@fos_elastica.manager.orm"
      - %elastica_entity%
      - ['%search_string%']
    calls:
      - [addFilter, ['@elastic.search.filter.enabled']]

If you want add Aggregations

1) Create a new service with Easy Search Aggregation Object

        ## example
        elastic.search.aggregation.categories:
          class: Elastica\Aggregation\Terms
          arguments:
            - %name%
          calls:
            - [setField, ['%category_field%']]
            - [setSize, [%category_size%]]

2) Add this aggregation to your Easy Search Service

EXAMPLE

   article.search:
     class: SearchBundle\Services\SearchService
     arguments:
       - "@fos_elastica.manager.orm"
       - %elastica_entity%
       - ['%search_string%']
     calls:
       - [addAggregation, [@elastic.search.aggregation.categories]]

Now you can make a search using this service, example:

       $searchService = $this->get('article.search');
       $results = $searchService->search('hello');

All versions of easy-search-bundle with dependencies

PHP Build Version
Package Version
Requires symfony/symfony Version ~2.7.7
friendsofsymfony/elastica-bundle Version ^3.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package manugarciaes/easy-search-bundle contains the following files

Loading the files please wait ...