#859: WebSearch: wildcard limit to apply only where necessary
-------------------------+---------------------
Reporter: jcaffaro | Owner: lmarian
Type: enhancement | Status: new
Priority: major | Milestone:
Component: WebSearch | Version:
Keywords: |
-------------------------+---------------------
#138 introduced a limit for wildcard queries that applies by default to
all calls to perform_request_search(..) function:
{{{
def perform_request_search(..., wl=CFG_WEBSEARCH_WILDCARD_LIMIT):
[...]
}}}
(source:/modules/websearch/lib/search_engine.py@ee9a940e254681f7b7f215374ee11426440ac3d5#L4391)
Unmodified code existing prior to this enhancement has therefore inherited
from this beheviour, including where not necessary/wanted: WebStat,
MultiEdit, code living outside the repo, etc.
To avoid any issue related to the truncation of the results returned by
{{{perform_request_search(...)}}} it might be wished to:
* either review the calls to {{{perform_request_search(...)}}} and set
{{{wl=0}}} where needed/wanted (or switch to {{{search_pattern(...)}}}
where possible/wanted)
* or set {{{wl=0}}} by default in
{{{search_engine.perform_request_search(...)}}}, and apply the limit
{{{CFG_WEBSEARCH_WILDCARD_LIMIT}}} only in public web interface handlers
that call {{{perform_request_search(...)}}}
Both solution have pros/cons. Depending on the chosen solution sub-tickets
for each of the affected modules might be created and assigned to the
module maintainer. Consistent modifications would be nice: if authorized
users are given the rights to bypass the limit in some module (eg.
MultiEdit) it might be desirable to also allow them to bypass the limit in
WebSearch (eg. {{{acc_authorize_action(req, 'runbibeditmulti')}}}).
--
Ticket URL: <http://invenio-software.org/ticket/859>
Invenio <http://invenio-software.org>