Skip to content

Commit

Permalink
allow language as a valid tagCategory name (closes #276)
Browse files Browse the repository at this point in the history
  • Loading branch information
boogheta committed May 29, 2019
1 parent 92b6bc1 commit d69ca6d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hyphe_backend/lib/mongo.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def init_corpus_indexes(self, corpus, retry=True):
yield self.WEs(corpus).create_index(sortasc('name'), background=True)
yield self.WEs(corpus).create_index(sortasc('status'), background=True)
yield self.WEs(corpus).create_index(sortasc('crawled'), background=True)
yield self.WEs(corpus).create_index(mongosort(textIndex("$**")), background=True)
yield self.WEs(corpus).create_index(mongosort(textIndex("$**")), language_override="HYPHE_MONGODB_LANGUAGE_INDEX_FIELD_NAME", background=True)
yield self.WECRs(corpus).create_index(sortasc('prefix'), background=True)
yield self.pages(corpus).create_index(sortasc('timestamp'), background=True)
yield self.pages(corpus).create_index(sortasc('_job'), background=True)
Expand Down Expand Up @@ -144,7 +144,7 @@ def init_corpus_indexes(self, corpus, retry=True):
# catch and destroy old indices built with older pymongo versions
if retry:
yield self.db()['corpus'].drop_indexes()
for coll in ["pages", "queue", "logs", "jobs", "stats"]:
for coll in ["webentities", "pages", "queue", "logs", "jobs", "stats"]:
yield self._get_coll(corpus, coll).drop_indexes()
yield self.init_corpus_indexes(corpus, retry=False)
else:
Expand Down

0 comments on commit d69ca6d

Please sign in to comment.