Skip to content

Commit

Permalink
Revert "mongodb performance improvement. Making index_creation as opt…
Browse files Browse the repository at this point in the history
…ional"

This reverts commit 847b2a7.
  • Loading branch information
nvenkat94 committed Feb 19, 2024
1 parent ee19844 commit f61b857
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ def __init__(
session_id: str,
database_name: str = DEFAULT_DBNAME,
collection_name: str = DEFAULT_COLLECTION_NAME,
index_creation:bool =True
):
from pymongo import MongoClient, errors

Expand All @@ -48,8 +47,7 @@ def __init__(

self.db = self.client[database_name]
self.collection = self.db[collection_name]
if index_creation: #Conditional Index Creation for collection
self.collection.create_index("SessionId")
self.collection.create_index("SessionId")

@property
def messages(self) -> List[BaseMessage]: # type: ignore
Expand Down

0 comments on commit f61b857

Please sign in to comment.