hestia_earth.utils.api.search¶
-
hestia_earth.utils.api.search(query, fields=['@type', '@id', 'name'], limit=10, offset=0, sort=None)[source]¶ Executes a raw search on the Hestia Platform.
- Parameters
query (
dict) – The search engine is using ElasticSearch engine version 7: https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html. All options can be used here.fields – The list of fields to return. Example: [‘@type’, ‘@id’]. Defaults to [‘@type’, ‘@id’, ‘name’].
limit – Optional - limit the number of results to return. Defaults to 10.
offset – Optional - use with limit to paginate the results. Defaults to 0.
sort (dict) – Sorting options. Please refer to the ElasticSearch version 7 documentation for use.
- Returns
List of Nodes (as JSON) found.
- Return type
List[JSON]