collective / collective.solr

Solr search engine integration for Plone
https://pypi.org/project/collective.solr/
22 stars 46 forks source link

How to get version 8 running? #261

Open zopyx opened 4 years ago

zopyx commented 4 years ago

The installation instructions for collective.solr 8 are broken

$ wget https://github.com/collective/collective.solr/raw/master/solr.cfg
$ wget https://raw.githubusercontent.com/collective/collective.solr/master/solr-4.10.x.cfg

references to non-existing URLs.

tisto commented 4 years ago

@zopyx thanks for reporting! I guess this should be like this:

Add a new solr section to your existing buildout:

[solr] recipe = kitconcept.recipe.solr src = http://archive.apache.org/dist/lucene/solr/7.7.2/solr-7.7.2.tgz solr-config = etc/solr port = 8983

Fetch the solr-config:

rsync -avz https://github.com/kitconcept/kitconcept.recipe.solr/tree/master/config/ etc/solr/

Run buildout and start solr with:

bin/solr-start

Haven't checked this. Just from the top of my head...

Disclaimer: do not use kitconcept.recipe.solr in production. It is not meant for testing and dev only. Rely on Ansible or any other provisioning tool you like.

tisto commented 4 years ago

@zopyx ok, just realized, you can not really rsync from github. :/

tisto commented 4 years ago

Ideally, we'd amend the Solr recipe to work without any downloaded Solr config. Though, I never came around doing so...

tisto commented 4 years ago

@zopyx I created a gist: https://gist.github.com/tisto/26a0ec4d497d77452a96e98a7bd8be05

give it a shot...

1letter commented 4 years ago

@zopyx this buildout did the job, but with python3.8 there is a bug in maintenance.py of collective.solr. the import of from time import clock is deprecated.

[buildout]
index =
    https://pypi.org/simple/

extends =
    https://dist.plone.org/release/5-latest/versions.cfg

find-links +=
    http://dist.plone.org/thirdparty/

versions=versions

parts +=
    instance
    solr

extensions =
    mr.developer

develop = 
sources = sources
auto-checkout = *
always-checkout = force

user=admin:admin

environment-vars =
    zope_i18n_compile_mo_files true
    PYTHON_EGG_CACHE ${buildout:directory}/var/.python-eggs
    TZ Europe/Berlin
    zope_i18n_allowed_languages en de

[instance]
recipe              = plone.recipe.zope2instance
user                = ${buildout:user}
environment-vars    = ${buildout:environment-vars}
eggs =
    Plone
    Pillow
    collective.solr

[solr]
recipe = kitconcept.recipe.solr
src = http://archive.apache.org/dist/lucene/solr/8.5.0/solr-8.5.0.tgz
solr-config = config

[versions]
collective.solr = 8.0.0a12
kitconcept.recipe.solr = 1.0.0a5