-
Notifications
You must be signed in to change notification settings - Fork 18
Node search #892
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node search #892
Conversation
api/handlers/dataexplorerhandler.py
Outdated
size = self.search_size(return_type) | ||
body = { | ||
"size": 0, | ||
"_source": ["session._id"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we'll want this to be based on return_type, I'm sure this is just a hard code you missed taking out.
api/handlers/dataexplorerhandler.py
Outdated
return self.get_file_nodes(return_type, filters, search_string) | ||
|
||
size = self.search_size(return_type) | ||
body = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could just call "_construct_query" and change the "_source" key?
} | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and this would call "_construct_file_query" ?
nodes = [] | ||
results = helpers.scan(client=config.es, query={'query': query}, scroll='5m', size=1000, index='data_explorer', doc_type='flywheel', _source=[return_type+'._id']) | ||
log.debug(results) | ||
for result in results: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and we'd want to set the source whitelist
Changes look good! I was originally confused about removing part of the |
Fixes #887
Returns list of nodes of all containers that are returned from a given search query
/dataexplorer/search/nodes
Review Checklist