From 418254af3f0cf6cc21504c4d34d7ad3f8f3ca7d4 Mon Sep 17 00:00:00 2001 From: tomleb Date: Wed, 31 May 2017 21:19:55 -0400 Subject: [PATCH 1/2] Fix wrong column name in torrents_action --- deploy/ansible/roles/elasticsearch/files/reindex_nyaapantsu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/ansible/roles/elasticsearch/files/reindex_nyaapantsu.py b/deploy/ansible/roles/elasticsearch/files/reindex_nyaapantsu.py index 4c9abe3c..ff5aa206 100644 --- a/deploy/ansible/roles/elasticsearch/files/reindex_nyaapantsu.py +++ b/deploy/ansible/roles/elasticsearch/files/reindex_nyaapantsu.py @@ -23,7 +23,7 @@ pgconn = psycopg2.connect(dbparams) cur = pgconn.cursor() # We MUST use NO QUERY CACHE because the values are insert on triggers and # not through pgppool. -cur.execute("""/*NO QUERY CACHE*/ SELECT id, torrent_id, action FROM reindex_torrents""") +cur.execute("""/*NO QUERY CACHE*/ SELECT reindex_torrents_id, torrent_id, action FROM reindex_torrents""") fetches = cur.fetchmany(CHUNK_SIZE) while fetches: From 212027c6a6d69af52c8df399a6b9019828043d28 Mon Sep 17 00:00:00 2001 From: tomleb Date: Wed, 31 May 2017 21:20:58 -0400 Subject: [PATCH 2/2] Use minimum 1 ngram (ie: for Gantz O) --- .../roles/elasticsearch/files/elasticsearch_settings.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/ansible/roles/elasticsearch/files/elasticsearch_settings.yml b/deploy/ansible/roles/elasticsearch/files/elasticsearch_settings.yml index c59d47e6..42347c4c 100644 --- a/deploy/ansible/roles/elasticsearch/files/elasticsearch_settings.yml +++ b/deploy/ansible/roles/elasticsearch/files/elasticsearch_settings.yml @@ -24,8 +24,8 @@ settings: filter: e_ngram_filter: type: edge_ngram - min_gram: 2 - max_gram: 15 + min_gram: 1 + max_gram: 16 char_filter: dash_to_underscore: