T52710 search on id works
This commit is contained in:
@@ -21,32 +21,23 @@ def push_updated_user(user_to_index: dict):
|
||||
Push an update to the Elastic index when
|
||||
a user item is updated.
|
||||
"""
|
||||
|
||||
log.warning(
|
||||
'WIP USER ELK INDEXING %s %s',
|
||||
user_to_index.get('username'),
|
||||
user_to_index.get('objectID'))
|
||||
|
||||
doc = documents.create_doc_from_user_data(user_to_index)
|
||||
log.debug('UPDATE USER %s', doc._id)
|
||||
doc.save()
|
||||
log.warning('CREATED ELK USER DOC')
|
||||
|
||||
|
||||
def index_node_save(node_to_index: dict):
|
||||
|
||||
log.warning(
|
||||
'ELK NODE INDEXING %s',
|
||||
node_to_index.get('objectID'))
|
||||
|
||||
log.warning(node_to_index)
|
||||
if not node_to_index:
|
||||
return
|
||||
|
||||
doc = documents.create_doc_from_node_data(node_to_index)
|
||||
|
||||
log.warning('CREATED ELK NODE DOC')
|
||||
log.debug('CREATED ELK NODE DOC %s', doc._id)
|
||||
doc.save()
|
||||
|
||||
|
||||
def index_node_delete(delete_id: str):
|
||||
|
||||
log.warning('NODE DELETE INDEXING %s', delete_id)
|
||||
log.debug('NODE DELETE INDEXING %s', delete_id)
|
||||
documents.Node(id=delete_id).delete()
|
||||
|
Reference in New Issue
Block a user