kunstmaan/node-search-bundle

This bundle uses the KunstmaanSearchBundle to search through Nodes from the KunstmaanNodeBundle

Maintainers

👁 Kunstmaan

Package info

github.com/Kunstmaan/KunstmaanNodeSearchBundle

Type:symfony-bundle

pkg:composer/kunstmaan/node-search-bundle

Statistics

Installs: 81 246

Dependents: 1

Suggesters: 0

Stars: 8

7.3.0 2025-02-08 19:25 UTC

MIT 4f1b9a543603c803b1a0a309c17250cf6cdc76a7

searchelasticsearchnodekunstmaan

This package is auto-updated.

Last update: 2026-06-15 20:28:24 UTC


README

👁 Build Status
👁 Total Downloads
👁 Latest Stable Version
👁 Analytics

This bundle uses the KunstmaanSearchBundle to search through Nodes from the KunstmaanNodeBundle

Installation

composer.json

 "require": {
 "kunstmaan/node-search-bundle": "*"
 },

AppKernel.php:

 public function registerBundles()
 {
 $bundles = array(
 // ...
 new Kunstmaan\NodeSearchBundle\KunstmaanNodeSearchBundle(),
 // ...
 );

Configuration

SearchPage

Extend the AbstractSearchPage and add your new class as a possible child to a page in your website :

 /**
 * @return array
 */
 public function getPossibleChildTypes()
 {
 return array(
 array(
 'name' => 'Search page',
 'class'=> "Acme\DemoBundle\Entity\SearchPage"
 )
 );
 }

Custom mapping

You may configure the index mapping via Symfony config. For example:

# config.yml
kunstmaan_node_search:
 mapping:
 average_score:
 name: average_score
 type: float
 index: not_analyzed
 tags:
 name: tags
 type: string
 index: analyzed

Please notice that this does not index any data.

Adding data to index

Pages can implement HasCustomSearchDataInterface to dynamically add more data to the document while indexing. For more complex scenarios a service can listen on the kunstmaan_node_search.onIndexNode event.

Documentation

Find more documentation on how it works here