From 1010068ddb0e1c4e220104465f1da9a54a795a02 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Mon, 25 Jan 2021 00:18:03 -0300 Subject: [PATCH] disable refresh interval. start with 3 shards --- lbry/wallet/server/db/elastic_search.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lbry/wallet/server/db/elastic_search.py b/lbry/wallet/server/db/elastic_search.py index 82956dc1a..7fa6daee1 100644 --- a/lbry/wallet/server/db/elastic_search.py +++ b/lbry/wallet/server/db/elastic_search.py @@ -29,10 +29,15 @@ class SearchIndex: await self.client.indices.create( self.index, {"settings": - {"analysis": - {"analyzer": {"default": {"tokenizer": "whitespace", "filter": ["lowercase", "porter_stem" ]}}} - } - } + {"analysis": + {"analyzer": { + "default": {"tokenizer": "whitespace", "filter": ["lowercase", "porter_stem"]}}}, + "index": + {"refresh_interval": -1, + "number_of_shards": 3} + }, + + } ) except Exception as e: raise