-
-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Description
Hi, I'm not sure I understand how the method set_default_index_prefix('foo_') is supposed to work. Should it be called in the model? Before the connexion?
I tried to put it everywhere but nothing seems to work, the prefix used to store my class is always esorm.
Here's my very simple use case:
class Profile(ESModel)
username: str = Field(frozen=True)
profile_name: str = Field(frozen=True)
config: list[dict] = Field(default_factory=list)
if __name__ == "__main__":
set_default_index_prefix('foo_')
asyncio.run(connect("http://localhost:9200"))
set_default_index_prefix('foo_')
profile = Profile(username="test_username", profile_name="test_profile_name",
config=[{"test": "foo", "columns": [{"name": "the column name"}]}])
asyncio.run(profile.save())The newly created index is name esorm_profile instead of foo_profile, am I missing something?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels