Skip to main content

Solr integration for external indexing and searching.

Project description

Introduction

collective.solr is an approach to integrate the Solr search engine with Plone. It provides an indexing processor for use with collective.indexing as well as a search API similar to the standard portal catalog. GenericSetup profiles can be applied to set up content indexing in Solr and use it as a backend for Plone’s site and live search facilities.

Current Status

The implementation is considered to be nearly finished. The package can be installed in a Plone 3.x site to enable indexing operations as well as searching (site and live search) using Solr. Doing so will not only significantly improve search performance — especially for a large number of indexed objects, but also reduce the memory footprint of your Plone instance by allowing to remove the SearchableText index from the portal catalog — at least for most sites. A sample buildout is provided for your convenience.

The code was written with emphasis on minimalism, clarity and maintainability. It comes with extensive tests covering the code base. The package is currently in use in production and considered stable.

For outstanding issues and features remaining to be implemented please see the to-do list included in the package as well as it’s issue tracker.

FAQs / Troubleshooting

“AssertionError: cannot use multiple direct indexers; please enable queueing”

Symptom

When installing additional packages or applying a GenericSetup profile you’re getting the following error:

AssertionError: cannot use multiple direct indexers; please enable queueing
Problem

Early versions of the package used a persistent local utility, which is still present in your ZODB. This utility has meanwhile been replaced so that there are currently two instances present. However, without queued indexing being enabled, only one such indexer is allowed at a time.

Solution

Please simply re-install the package via Plone’s control panel or the quick-installer. Alternatively you can also use the ZMI “Components” tab on your site root object, typically located at http://localhost:8080/plone/manage_components, to remove the broken utilities from the XML. Search for “broken”.

Credits

This code was inspired by enfold.solr by Enfold Systems as well as work done at the snowsprint’08. The solr.py module is based on the original python integration package from Solr itself.

Development was kindly sponsored by Elkjop.

Changelog

1.0b7 - Released April 28, 2009

  • Fix unintended (de)activation of the Solr integration during profile (re)application. [witsch]

  • Fix display of facet information with no active facets. [witsch]

  • Register import and export steps using ZCML. [witsch]

1.0b6 - Released April 20, 2009

  • Add support for facetted searches. [witsch]

  • Update code to comply to PEP8 style guide lines. [witsch]

  • Expose additional information provided by Solr - for example about headers and search facets. [witsch]

  • Handle edge cases like invalid range queries by quoting [tesdal]

  • Parse and quote the query to filter invalid query syntax. [tesdal]

  • In solrSearchResults, if the passed in request is a dict, look up request to enable adaptation into PloneFlare. [tesdal]

  • Added support for objects with a ‘query’ attribute as search values. [tmog]

1.0b5 - Released December 16, 2008

  • Fix and extend logging in “sync” maintenance view. [witsch]

1.0b4 - Released November 23, 2008

  • Filter control characters to prevent indexing errors. This fixes http://plone.org/products/collective.solr/issues/1 [witsch]

  • Avoid using brains when getting all objects from the catalog for sync runs. [witsch]

  • Prefix output from maintenance views with a time-stamp. [witsch]

1.0b3 - Released November 12, 2008

  • Fix url fallback during schema retrieval. [witsch]

  • Fix issue regarding quoting of white space when searching. [witsch]

  • Make indexing operations more robust in case the schema is missing a unique key or couldn’t be parsed. [witsch]

1.0b2 - Released November 7, 2008

  • Make schema retrieval slightly more robust to not let network failures prevent access to the site. [witsch]

1.0b1 - Released November 5, 2008

  • Initial release [witsch]

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

collective.solr-1.0b7.zip (117.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page