From 6e104de322ca0f50faa6e9888dfc0435981a7173 Mon Sep 17 00:00:00 2001 From: mboudet Date: Fri, 15 Feb 2019 10:14:54 +0000 Subject: [PATCH 1/3] Limit tripal2 --- tripal/db/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tripal/db/__init__.py b/tripal/db/__init__.py index 66ac809..319fb49 100644 --- a/tripal/db/__init__.py +++ b/tripal/db/__init__.py @@ -263,6 +263,9 @@ def tune(self): """ + if self.tripal.version == 2: + raise NotImplementedError("Tuning is not required in Tripal 2") + data = {} res = self._request('elasticsearch/tune', data) From 0ac7c08db8a875ff2ee0cb7c04185d7b592331f1 Mon Sep 17 00:00:00 2001 From: mboudet Date: Fri, 15 Feb 2019 10:50:54 +0000 Subject: [PATCH 2/3] Fix --- tripaille/commands/db/index.py | 2 +- tripaille/commands/db/tune.py | 2 +- tripal/db/__init__.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tripaille/commands/db/index.py b/tripaille/commands/db/index.py index 6862df6..5b732ab 100644 --- a/tripaille/commands/db/index.py +++ b/tripaille/commands/db/index.py @@ -76,7 +76,7 @@ @pass_context @custom_exception @str_output -def cli(ctx, mode="website", table="", index_name="", queues=10, fields=None, links={}, tokenizer="standard", token_filters=None, exposed=False, index_url="", job_name="", no_wait=False): +def cli(ctx, mode=website, table="", index_name="", queues=10, fields=None, links={}, tokenizer=standard, token_filters=None, exposed=False, index_url="", job_name="", no_wait=False): """Schedule database indexing using elasticsearch Output: diff --git a/tripaille/commands/db/tune.py b/tripaille/commands/db/tune.py index 993bb6e..f4fcbce 100644 --- a/tripaille/commands/db/tune.py +++ b/tripaille/commands/db/tune.py @@ -8,7 +8,7 @@ @custom_exception @dict_output def cli(ctx): - """Tune indices for website indexation + """Setup default entity index priority for whole website indexing Output: diff --git a/tripal/db/__init__.py b/tripal/db/__init__.py index 319fb49..6badc27 100644 --- a/tripal/db/__init__.py +++ b/tripal/db/__init__.py @@ -256,7 +256,7 @@ def _do_populate_mview(self, mview, no_wait=False, job_name=None): def tune(self): """ - Tune indices for website indexation + Setup default entity index priority for whole website indexing :rtype: dict :return: "Status" From c1d0128b16b7c0d3794e217993b053bf0fb64a71 Mon Sep 17 00:00:00 2001 From: mboudet Date: Fri, 15 Feb 2019 10:52:51 +0000 Subject: [PATCH 3/3] Woops --- tripaille/commands/db/index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tripaille/commands/db/index.py b/tripaille/commands/db/index.py index 5b732ab..6862df6 100644 --- a/tripaille/commands/db/index.py +++ b/tripaille/commands/db/index.py @@ -76,7 +76,7 @@ @pass_context @custom_exception @str_output -def cli(ctx, mode=website, table="", index_name="", queues=10, fields=None, links={}, tokenizer=standard, token_filters=None, exposed=False, index_url="", job_name="", no_wait=False): +def cli(ctx, mode="website", table="", index_name="", queues=10, fields=None, links={}, tokenizer="standard", token_filters=None, exposed=False, index_url="", job_name="", no_wait=False): """Schedule database indexing using elasticsearch Output: