Hestia Utils
stable

API Reference

  • hestia_earth.utils
    • hestia_earth.utils.api
      • hestia_earth.utils.api.download_hestia
      • hestia_earth.utils.api.find_node
      • hestia_earth.utils.api.find_node_exact
      • hestia_earth.utils.api.find_related
      • hestia_earth.utils.api.find_term_ids_by_names
      • hestia_earth.utils.api.node_exists
      • hestia_earth.utils.api.node_to_path
      • hestia_earth.utils.api.node_type_to_url
      • hestia_earth.utils.api.search
    • hestia_earth.utils.date
    • hestia_earth.utils.lookup
    • hestia_earth.utils.model
    • hestia_earth.utils.request
    • hestia_earth.utils.storage
    • hestia_earth.utils.tools
    • hestia_earth.utils.version
Hestia Utils
  • »
  • hestia_earth.utils »
  • hestia_earth.utils.api »
  • hestia_earth.utils.api.search
  • Edit on GitLab

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]

Next Previous

© Copyright 2020, Hestia Team Revision 30d62f72.

Built with Sphinx using a theme provided by Read the Docs.