Created
August 27, 2014 14:34
-
-
Save tisto/43bcd4ec21ce5abb3587 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
============================================================================== | |
SOLR HOWTO | |
============================================================================== | |
Vorbereitungen | |
============================================================================== | |
Java OpenJDK installieren: | |
$ sudo apt-get install openjdk-7-jre | |
Wget installieren: | |
$ sudo apt-get install -y wget | |
Python 2.7 installieren: | |
$ sudo apt-get install -y libxslt1-dev libxml2-dev | |
$ sudo apt-get install -y python-dev python-imaging python-lxml | |
Setuptools installieren: | |
$ wget https://bootstrap.pypa.io/ez_setup.py -O - | sudo python | |
Buildout | |
============================================================================== | |
Plone Verzeichnis erstellen:: | |
$ mkdir plone-solr | |
Download bootstrap Datei:: | |
$ cd plone-solr | |
$ wget http://downloads.buildout.org/2/bootstrap.py | |
Datei "buildout.cfg" erstellen:: | |
[buildout] | |
parts = instance | |
extends = http://dist.plone.org/release/4.3.3/versions.cfg | |
[instance] | |
recipe = plone.recipe.zope2instance | |
http-address = 8080 | |
user = admin:admin | |
eggs = | |
Plone | |
collective.solr | |
Buildout ausführen:: | |
$ python bootstrap.py | |
$ bin/buildout | |
Zope Instanz starten (im "Foreground"-Modus):: | |
$ bin/instance fg | |
Zope Instanz starten:: | |
$ bin/instance start | |
Zope Instanz stoppen:: | |
$ bin/instance stop | |
Solr Installation | |
================= | |
buildout.cfg:: | |
[buildout] | |
parts = | |
instance | |
solr-download | |
solr | |
extends = http://dist.plone.org/release/4.3.3/versions.cfg | |
[instance] | |
recipe = plone.recipe.zope2instance | |
http-address = 8080 | |
user = admin:admin | |
eggs = | |
Plone | |
collective.solr | |
[solr-download] | |
recipe = hexagonit.recipe.download | |
strip-top-level-dir = true | |
ignore-existing = true | |
url = http://archive.apache.org/dist/lucene/solr/4.4.0/solr-4.4.0.tgz | |
md5sum = 6ae4f981a7e5e79fd5fc3675e19602f3 | |
[solr] | |
recipe = collective.recipe.solrinstance | |
solr-location = ${solr-download:location} | |
host = localhost | |
port = 8983 | |
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 | |
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: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 | |
Solr starten:: | |
$ bin/solr-instance fg | |
Solr Web Interface aufrufen:: | |
http://localhost:8983/solr/ | |
Collective Solr | |
--------------- | |
Plone Instanz erstellen mit collective.solr installiert. | |
Solr einschalten: Konfiguration -> Solr Settings -> Enable Solr | |
Solr Index erstellen: | |
localhost:8080/Plone/@@solr-maintenance/reindex | |
Suche nach Nachrichten:: | |
http://localhost:8080/Plone/@@search?SearchableText=nachrichten |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment