Skip to content

simplethings/SolrBundle

Repository files navigation

SimpleThingsSolrBundle

Build Status

Installing

$ composer require simplethings/solr-bundle
public function registerBundles()
{
    // ...
    new Nelmio\SolariumBundle\NelmioSolariumBundle(),
    new SimpleThings\Bundle\SolrBundle\SimpleThingsSolrBundle(),
    // ...
}

Configuration

app/config/config.yml

simple_things_solr:
    config_files:
      -
        prefix: Acme\Bundle\AcmeBundle\Entity
        path: "%kernel.root_dir%/../src/Acme/Bundle/AcmeBundle/Resources/config/solr"

src/Acme/Bundle/AcmeBundle/Resources/config/solr/Blog.yml

Acme\Bundle\AcmeBundle\Entity\Blog:
  type: document
  fields:
    id: id
    name: 
      type: text
      copy:
        - fulltext
    text:
      type: textSpell
      copy:
        - fulltext
    fulltext:
      type: textSpell
      mapped: false
      multiValued: true