From d0bc719795a59cfd2888d8a3e01d57334ae5d975 Mon Sep 17 00:00:00 2001 From: James <37276661+capjamesg@users.noreply.github.com> Date: Sun, 15 Dec 2024 18:17:41 +0000 Subject: [PATCH] Update index.py --- jamesql/index.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jamesql/index.py b/jamesql/index.py index be6d976..b180e6a 100644 --- a/jamesql/index.py +++ b/jamesql/index.py @@ -2,6 +2,7 @@ import json import math import os +import gc import string import threading import time @@ -829,6 +830,8 @@ def create_gsi( self.gsis[index_by]["id2line"] = {} self.gsis[index_by]["doc_lengths"] = {} + gc.collect() + return gsi def search(