Skip to content

Commit

Permalink
BibIndex: soften author index HACK
Browse files Browse the repository at this point in the history
* Makes any index having 'author' in the name, to fully consider
  BAIs.

Signed-off-by: Samuele Kaplun <[email protected]>
  • Loading branch information
kaplun committed Mar 20, 2015
1 parent de7620a commit 74dd09b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/bibindex/lib/bibindex_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -1387,7 +1387,7 @@ def add_recID_range(self, recID1, recID2):
self.recIDs_in_mem.append([recID1, recID2])
# special case of author indexes where we also add author
# canonical IDs:
if self.index_name in ('author', 'firstauthor', 'exactauthor', 'exactfirstauthor'):
if 'author' in self.index_name:
for recID in range(recID1, recID2 + 1):
if not wlist.has_key(recID):
wlist[recID] = []
Expand Down Expand Up @@ -1887,7 +1887,7 @@ def get_recIDs_by_date_bibliographic(dates, index_name, force_all=False):
(dates[0], dates[1],)))
# special case of author indexes where we need to re-index
# those records that were affected by changed BibAuthorID attributions:
if index_name in ('author', 'firstauthor', 'exactauthor', 'exactfirstauthor'):
if 'author' in index_name:
from invenio.bibauthorid_personid_maintenance import get_recids_affected_since
# dates[1] is ignored, since BibAuthorID API does not offer upper limit search
rec_list_author = get_recids_affected_since(dates[0], dates[1])
Expand Down

0 comments on commit 74dd09b

Please sign in to comment.