collective / collective.solr

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

Evaluate Python bindings for solr. #52

Open tisto opened 9 years ago

tisto commented 9 years ago

We should use one of the existing Python Solr binding packages, e.g.:

mamico commented 9 years ago

@tisto I've started (just started) a branch using scorched (http://scorched.readthedocs.org), here: https://github.com/collective/collective.solr/tree/issue-52-scorched

mamico commented 9 years ago

All tests run: https://travis-ci.org/collective/collective.solr/builds/68329320

tisto commented 9 years ago

@mamico nice. could you elaborate why you think scorched is superior to the other Python bindings? Or at least talk about your experience with it so far? I have tried pysolr and solrpy so far.

mamico commented 9 years ago

@tisto I don't have a big reason for the choice...

The big of the work was removing custom solr xml parser, so, eventually, change the binding will be really easy.

Small reasons: scorched was the choice for https://github.com/ploneintranet/ploneintranet/tree/master/src/ploneintranet/search (good guys, good choices ;), scorched (like pysolr) is an active project, scorched implements all the API that we need and more (get schema, select, update, delete, ...).

tisto commented 9 years ago

@mamico I think it is important to evaluate the different Python bindings before we put too much effort into the implementation.

It would be interesting to hear why Plone intranet choosed scorched over the other ones. Though, please note that the Plone intranet Solr implementation has nothing in common with c.solr. They choosed to implement the same functionality from the scratch.

mamico commented 9 years ago

@tisto I report what people at Plone Intranet say about the choice:

A few pointers on our choice:

  1. We liked the ‘pythonic’ API. Many of the other packages are just python bindings to the lucent query syntax. This means you can concentrate on just passing python variables to the scorched APIs instead of manually formatting a lucene string.
  2. The documentation was good.
  3. At the time it seemed to be more actively maintained than the others.
  4. It uses JSON as the transport format (pysolr/solrpy use XML), which was a more attractive, lightweight format.

Scorched is a fork of sunburnt, for more details on its goals see: https://pypi.python.org/pypi/scorched