#542: WebSearch - all-containing perform_request_search() makes it very hard to
re-use search engine
------------------------+----------------------
Reporter: rchyla | Owner: valkyrie
Type: defect | Status: assigned
Priority: major | Milestone:
Component: WebSearch | Version:
Resolution: | Keywords:
------------------------+----------------------
Comment (by jblayloc):
Replying to [comment:5 rchyla]:
> The patch attached, but maybe i will find out something more as i
continue plugging Solr. In particular, the part that displays the records
contains a lot of code
Reading the patch, it looks fine to me, except that I'd indent everything
one level. For refactorings of this type my sense of beauty is least
violated by making everything an inner function (that is, hiding it from
the global scope) to avoid needlessly complicating the already-complicated
API profile of the module. I like being able to use 'pydoc modulename'
and get something reasonable. It should work just as well with all the _
functions indented four spaces...
Then later, when it's discovered that actually some of these inner methods
are necessary to simplify code elsewhere in the module, that's when it's
appropriate to promote them (and probably change their names in the
process, but that's a separate issue.)
--
Ticket URL: <https://invenio-software.org/ticket/542#comment:7>
Invenio <http://invenio-software.org>