Skip to content

Commit

Permalink
OPS WebSearch: hack to workaround broken index
Browse files Browse the repository at this point in the history
Signed-off-by: Samuele Kaplun <[email protected]>
  • Loading branch information
kaplun committed Mar 20, 2015
1 parent 74dd09b commit 1e0d02a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions modules/websearch/lib/search_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -2106,6 +2106,11 @@ def search_pattern(req=None, p=None, f=None, m=None, ap=0, of="id", verbose=0, l

for idx_unit in xrange(len(basic_search_units)):
bsu_o, bsu_p, bsu_f, bsu_m = basic_search_units[idx_unit]
# TEMPORARY HACK untile unicode indexes are completed
if bsu_f == 'author' and re.match("\w+\.\w+\.\d+", bsu_p):
# Searching for BAIs in author is currently broken.
# Let's search in exactauthor
bsu_f = 'exactauthor'
if bsu_f and len(bsu_f) < 2:
if of.startswith("h"):
write_warning(_("There is no index %s. Searching for %s in all fields." % (bsu_f, bsu_p)), req=req)
Expand Down

0 comments on commit 1e0d02a

Please sign in to comment.