Set up Plone and Solr


Bootstrap project:

$ mkdir plone-training-solr
$ cd plone-training-solr
$ wget
$ wget

Create Buildout (buildout.cfg):

extends =
parts += instance

recipe = plone.recipe.zope2instance
http-address = 8080
user = admin:admin
eggs =

zope.interface = 4.0.5
zc.buildout = 2.3.1
setuptools = 8.0.4

Run buildout:

$ python2.7
$ bin/buildout

Start Plone:

$ bin/instance fg

Start Solr:

$ bin/solr-instance fg

Solr Buildout

Buildout parts:

parts +=

Base Solr Settings:

solr-host =
solr-port = 8983
solr-min-ram = 128M
solr-max-ram = 256M

Solr Download:

recipe =
strip-top-level-dir = true
url =
md5sum = 8ae107a760b3fc1ec7358a303886ca06

Solr Instance:

recipe = collective.recipe.solrinstance
solr-location = ${solr-download:location}
host = ${settings:solr-host}
port = ${settings:solr-port}
basepath = /solr
# autoCommitMaxTime = 900000
max-num-results = 500
section-name = SOLR
unique-key = UID
logdir = ${buildout:directory}/var/solr
default-search-field = default
default-operator = and
unique-key = UID
java_opts =


index =
    name:allowedRolesAndUsers   type:string stored:false multivalued:true
    name:created                type:date stored:true
    name:Creator                type:string stored:true
    name:Date                   type:date stored:true
    name:default                type:text indexed:true stored:false multivalued:true
    name:Description            type:text copyfield:default stored:true
    name:description            type:text copyfield:default stored:true
    name:effective              type:date stored:true
    name:exclude_from_nav       type:boolean indexed:false stored:true
    name:expires                type:date stored:true
    name:getIcon                type:string indexed:false stored:true
    name:getId                  type:string indexed:false stored:true
    name:getRemoteUrl           type:string indexed:false stored:true
    name:is_folderish           type:boolean stored:true
    name:Language               type:string stored:true
    name:modified               type:date stored:true
    name:object_provides        type:string stored:false multivalued:true
    name:path_depth             type:integer indexed:true stored:false
    name:path_parents           type:string indexed:true stored:false multivalued:true
    name:path_string            type:string indexed:false stored:true
    name:portal_type            type:string stored:true
    name:review_state           type:string stored:true
    name:SearchableText         type:text copyfield:default stored:false
    name:searchwords            type:string stored:false multivalued:true
    name:showinsearch           type:boolean stored:false
    name:Subject                type:string copyfield:default stored:true multivalued:true
    name:Title                  type:text copyfield:default stored:true
    name:Type                   type:string stored:true
    name:UID                    type:string stored:true required:true
  • name: Name of the field
  • type: Type of the field (e.g. “string”, “text”)
  • indexed: searchable
  • stored: returned as metadata
  • copyfield: copy content to another field, e.g. copy title, description, subject and SearchableText to default.

Plone and Solr

Activate Solr in Plone:

- Create Plone instance with collective.solr installed
- Go to: "Configuration" -> "Solr Settings"
- Check: "Active", click "Save"
- Go to: http://localhost:8080/Plone/@@solr-maintenance/reindex
- Search for "Plone"