BibAuthorID: concurrency tolerance with bibupload

* Skip records that have been modified by bibupload and not process
  by rabbit yet.
  They will processed next time.
Merge pull request #85 from Osso/bibauthorid-affiliations-cleanup

BibAuthorID: concurrency tolerance with bibupload
general: no INSERT delayed usage

* No longer uses INSERT DELAYED, since, beginning with MySQL 5.5.7,
  INSERT DELAYED is always handled as a simple INSERT (that is,
  without the DELAYED option) whenever the value of binlog_format is
  STATEMENT or MIXED. (In the latter case, the statement no longer
  triggers a switch to row-based logging, and so is logged using the
  statement-based format.)
  (closes #2268)

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>
Reported-by: Thorsten Schwander <thorsten.schwander@gmail.com>
Merge pull request #94 from kaplun/2268-no-insert-delayed-prod

general: no INSERT delayed usage
BibCheck: properly reset last_run timestamp

* When using the -a/--all CLI parameter of BibCheck,
  actually performs to reset of the last_run timestamp
  only upon execution of the bibtask and not when it is
  scheduled.

* Improves bibtask verbosity.

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>
BibUpload: ingestion_date and creation_date

* Introduces new ingestion_date column to bibrec table, allowing
  independently keeping track of the time when a record is first
  ingested into the repository, from the bibliographic creation date
  that could be used to properly sort the record according to its
  corresponding document date.

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>

Conflicts:
	modules/bibupload/lib/bibupload.py
	modules/miscutil/sql/tabcreate.sql
WebSearch: new dateingested logical field

* Introduces new dateingested logical field in the search engine
  syntax, corresponding to bibrec.ingestion_date.

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>

Conflicts:
	modules/miscutil/sql/tabfill.sql
	modules/websearch/lib/search_engine_query_parser.py
BibCheck: new creation_date check

* Exploits the BibCheck infrastructure to backdate the creation date of
  a record based on the actual content of its metadata. In this way
  tools such as BibSort will be able to properly sort records according
  to their real creation.
  (closes #1719) (closes #1604)

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>

Conflicts:
	modules/bibcheck/lib/plugins/creation_date.py
BibSort: creation date and ingestion order

* Introduces proper sorting by creation date, exploiting
  new bibcheck plugin introduced in previous commit and
  consequently backward compatible "ingestion order"
  sorting.
  (pr #2123)

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>

Conflicts:
	modules/miscutil/lib/inveniocfg.py
	modules/websearch/lib/websearch_regression_tests.py
Merge pull request #75 from kaplun/bibsort-on-prod

Bibsort on prod
OPS: properly have ingestion_date everywhere

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>
Merge pull request #95 from kaplun/ingestion-date-everywhere

OPS: properly have ingestion_date everywhere
WebSearch: fix for record numbering in pagination

* Adds optional `nb_found` argument to `print_records` allowing for a
  different list of records to be printed and number of records found,
  when we are only printing a subset of a total number of records
  found.  (closes #1762) (PR #1763)

Signed-off-by: Nikolaos Kasioumis <nikolaos.kasioumis@cern.ch>
Reviewed-by: Tibor Simko <tibor.simko@cern.ch>
Merge pull request #96 from kaplun/fix-record-numbering-in-pagination

WebSearch: fix for record numbering in pagination
BibSort: improved washers

* Improves speed and realiability of BibSort washers by properly
  exploiting textutils.decode_to_unicode() and
  textutils.translate_to_ascii() functions.

* Improves speed of textutils.translate_to_ascii().
  (addresses #1754)

* Makes unidecode dependency mandatory.
  (PR #2283)

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>
Merge pull request #97 from kaplun/bibsort-better-washers-prod

BibSort: improved washers
WebSearch: smarter journal hint

* Improves the JournalHintService implementation by directly
  a brief representation of a record when one is found.

* Additionally, suggests to use find rawref "foo" when "foo"
  is searched for, rather than journal:"bar".

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>
Merge pull request #99 from kaplun/smarter-journal-hint

WebSearch: smarter journal hint
BibSort: improved washers (OPS)

* Improves speed and realiability of BibSort washers by properly
  exploiting textutils.decode_to_unicode() and
  textutils.translate_to_ascii() functions.

* Improves speed of textutils.translate_to_ascii().
  (addresses #1754)

* Introduces new washer
  _sort_nosymbols_case_insensitive_strip_accents().

* Makes unidecode dependency mandatory.
  (PR #2283)

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>

Conflicts:
	modules/bibsort/lib/bibsort_washer.py
Merge pull request #105 from kaplun/bibsort-better-washers-prod

BibSort: improved washers (OPS)