Skip to content

Commit

Permalink
feat(search): do not index search results from Miqra Mevoar.
Browse files Browse the repository at this point in the history
  • Loading branch information
YishaiGlasner committed Apr 7, 2024
1 parent b3770c4 commit d3bc151
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion sefaria/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,13 @@ def get_all_versions(cls, tries=0, versions=None, page=0):
print("Tried: {} times. Got {} versions".format(tries, len(versions)))
raise e

@staticmethod
def is_included_in_search(version):
return version.versionTitle not in [
"Yehoyesh's Yiddish Tanakh Translation [yi]",
'Miqra Mevoar, trans. and edited by David Kokhav, Jerusalem 2020'
]

@classmethod
def index_all(cls, index_name, debug=False, for_es=True, action=None):
cls.index_name = index_name
Expand Down Expand Up @@ -522,7 +529,7 @@ def index_all(cls, index_name, debug=False, for_es=True, action=None):
except ValueError:
cls.best_time_period = None
for v in vlist:
if v.versionTitle == "Yehoyesh's Yiddish Tanakh Translation [yi]":
if cls.is_included_in_search(v):
print("skipping yiddish. we don't like yiddish")
continue

Expand Down

0 comments on commit d3bc151

Please sign in to comment.