WebSearch: inverted collection scores

* Updates how the `score` value from `collection_collection` is used,
  the lower the score the higher the position.  Useful for running
  Invenio 1 and Invenio 2 out of the same database.  (PR #2058)

* Updates `democfgdata.sql` to use the new score.

* Provides an upgrade recipe to update the `collection_collection`
  relationships. It changes the score setting its value from 0 to the
  number of "son collections".

Signed-off-by: Esteban J. G. Gabancho <esteban.gabancho@gmail.com>
Tested-by: Tibor Simko <tibor.simko@cern.ch>
errorlib: tags context fix for sentry

* (PR #2623)

Signed-off-by: Esteban J. G. Gabancho <esteban.gabancho@gmail.com>
Tested-by: Tibor Simko <tibor.simko@cern.ch>
installation: python-twitter requirement update

* Updates python-twitter in requirements.txt to the latest version
  (2.0) that supports Twitter 1.1 API.  (PR #2015)

Signed-off-by: Sebastian Witowski <sebastian.witowski@cern.ch>
Tested-by: Tibor Simko <tibor.simko@cern.ch>
SolrUtils: reliable regression test suite

* Makes test suite independent from PDF extraction process.
  (closes #1590)

* Simplifies test suite

Signed-off-by: Patrick Glauner <patrick.oliver.glauner@cern.ch>
WebSearch: new parsing of unbalanced phrase queries

* Removes unbalanced double quotation marks.

Signed-off-by: Patrick Glauner <patrick.oliver.glauner@cern.ch>
Merge pull request #28 from pglauner/master-solr-regression-tests

SolrUtils: reliable regression test suite

 the commit.
Merge pull request #29 from pglauner/master-search-units-phrase

WebSearch: new parsing of unbalanced phrase queries
WebSearch: new fulltext by default search

 * Adds checkbox to search terms also in to fulltext to the add
   to search interface.

Signed-off-by: Patrick Glauner <patrick.oliver.glauner@cern.ch>
BibRank: Solr: better ranking for fulltext by default

 * Ranks fulltext and metadata properly

Signed-off-by: Patrick Glauner <patrick.oliver.glauner@cern.ch>
Solrutils: more accurate ranking scores

 * Ceils ranking scores to avoid anomalies

Signed-off-by: Patrick Glauner <patrick.oliver.glauner@cern.ch>
Merge pull request #30 from pglauner/master-fulltext-by-default

See comment in <https://github.com/CERNDocumentServer/cds-ops/pull/30#issuecomment-44002640> regarding kwargs.
BibRecord: new MARC code filter

* Filters a record based on MARC code

* Supports wildcards in identifiers and subfield code

Signed-off-by: Patrick Glauner <patrick.oliver.glauner@cern.ch>
BibFormat: new 'xmf' format

* Supports filtering per MARC tag, identifier and subfield

Signed-off-by: Patrick Glauner <patrick.oliver.glauner@cern.ch>
Merge pull request #31 from pglauner/master-xm-fielded

Master xm fielded
Websearch: fix results when applying search limits

* Fixes prs_apply_search_limits so that the results_final dictionary is
  updated, rather than re-defined locally.

(closes #1750)

Signed-off-by: Nikolaos Kasioumis <nikolaos.kasioumis@cern.ch>
Co-Authored-By: Ludmila Marian <ludmila.marian@gmail.com>
Merge pull request #41 from kasioumis/master-search-engine-fix-apply-search-limits

Websearch: fix results when applying search limits
WebStat: Set default query for the custom summary

* According to RQF0382332 for CDS: Set a default query for the
  "Custom query summary" under "Administration" / "Statistics".
Merge pull request #63 from kasioumis/master-RQF0382332

WebStat: Set default query for the custom summary (RQF0382332)
general: Elasticsearch logging with Lumberjack.

* Added disabled-by-default config options for Elasticsearch logging.

* When Elasticsearch logging is configured, don't populate rnkPAGEVIEWS and
  rnkDOWNLOADS.

Signed-off-by: Joe MacMahon <joe.macmahon@cern.ch>
elasticsearch: Added search hosts config variable.

* Added a configuration variable to configure which Elasticsearch hosts should
  be used for executing queries.

Signed-off-by: Joe MacMahon <joe.macmahon@cern.ch>