#271: Allow easy creation and easy selection of search interfaces
--------------------------+-------------------------------------------------
Reporter: bthiell | Owner:
Type: enhancement | Status: new
Priority: major | Milestone:
Component: WebSearch | Version:
Keywords: ADS EPFL GET |
--------------------------+-------------------------------------------------
We currently have the need to allow developing new search interfaces
(other than simple search and advanced search), for example ADS needs a
new search interface, EPFL Infoscience has modified the search interface
in order to introduce a new search parameter. During the Inspire summit
August-September 2010, we also mentioned that it would be nice to have
more flexible search interfaces for admin users (which could allow to sort
by any MARC field or even write the URL in some sort of human-
understandable way).
It is possible to hack ```websearch_templates```, ```search_engine``` and
```websearch_webinterface``` in order to produce new search interfaces but
it is a tough task and results in a solution that is dirty because it
touches lots of crucial parts of Invenio and creates function signatures
with as much as 68 parameters (for ```perform_request_search``` in order
to support all ADS search parameters). Adding new search interfaces will
only make that number grow and therefore compromise the maintainability of
the search engine.
One solution would be to allow to choose available search interfaces in
the configuration file. Also it would be nice to be able to pass a
dictionary of non-standard GET arguments to the search engine methods
(e.g. ```perform_request_search(req, ..., **non_standard_params)```) and
these would be later handled by code specific to each search interface.
Currently the selection of search interfaces in the configuration of
Invenio is marked as experimental (see
source:/modules/miscutil/lib/inveniocfg.py#L214). Maybe we could allow to
use named search interfaces,.:
{{{
CFG_DEFAULT_SEARCH_INTERFACE = 'Invenio simple search'
CFG_WEBSEARCH_ENABLED_SEARCH_INTERFACES = ['Invenio simple search', 'ADS
advanced search', 'EPFL simple search']
}}}
Then the aas value would be dynamically generated for the enabled search
interfaces so that the first interface in the list has ```aas=0``` and the
other interfaces would have then incremental values.
--
Ticket URL: <http://invenio-software.org/ticket/271>
Invenio <http://invenio-software.org>