inspirehep/ops — pull request #1 by fpoli (2014-05-21 13:37:46+00:00)
Title: Websearch refersto long query fix to ops

* Limit DOS attacks with 'refersto' and similar keywords (e.g. 'refersto:year:0-->9999').
* Adds configuration variable CFG_WEBSEARCH_MAX_RECORDS_REFERSTO and CFG_WEBSEARCH_MAX_RECORDS_CITEDBY.
* Limits result used by 'refersto', 'referstoexcludingselfcites' to CFG_WEBSEARCH_MAX_RECORDS_REFERSTO.
* Limits result used by 'citedby', 'citedbyexcludingselfcites' to CFG_WEBSEARCH_MAX_RECORDS_CITEDBY.
* Adds classes 'InvenioWebSearchReferstoLimitError' and 'InvenioWebSearchCitedbyLimitError'.
* Adds warning messages when the limit CFG_WEBSEARCH_MAX_RECORDS_* is reached.
* In BibRank adds 'input_limits' parameter to 'get_refersto_by_list', 'get_refersto_hitset', 'get_cited_by_list', 'get_citedby_hitset' (default to None).
* Adds regression test for the query 'refersto:year:2000'.

Conflicts:
* config/invenio.conf
* modules/bibrank/lib/bibrank_citation_searcher.py
* modules/websearch/lib/search_engine.py