-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
When I retrive a Search object for which I want to edit the kibanaSavedObjectMeta the save does nothing:
Search._d_do not contains thesearchAttrDict and thus the saving that callsto_dictdoes not save anythingSearch.searchreturn a dict instead of AttrDict but it is not stored in the object- The following code should change the index used in
search_source(a Search object) but does not save anything
# change index pattern
search_source = src_search.search.get("kibanaSavedObjectMeta", {}).get(
"searchSourceJSON", ""
)
source = json.loads(search_source)
if "index" in source:
source["index"] = "another_index"
src_search.search["kibanaSavedObjectMeta"][
"searchSourceJSON"
] = json.dumps(source)
src_search.save(index=slave_kibana_index)The problem is probably related to the keyword search that is also used as a static method (Document.search)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels