eodag.plugins.search.build_search_result.BuildSearchResult#
- class eodag.plugins.search.build_search_result.BuildSearchResult(provider: str, config: PluginConfig)[source]#
BuildSearchResult search plugin.
This plugin builds a single
SearchResult
object using given query parameters as product properties.The available configuration parameters inherits from parent classes, with particularly for this plugin:
end_date_excluded: Set to False if provider does not include end date to search
remove_from_query: List of parameters used to parse metadata but that must not be included to the query
constraints_file_url: url of the constraint file used to build queryables
- Parameters:
Methods
__init__
(provider, config)build_query_string
(product_type, **kwargs)Build The query string using the search parameters
build_sort_by
(sort_by_arg)Build the sorting part of the query string or body by transforming the "sortBy" argument into a provider-specific string or dictionnary
clear
()Clear search context
collect_search_urls
([page, items_per_page, ...])Wraps PostJsonSearch.collect_search_urls to force product count to 1
count_hits
([count_url, result_type])Count method that will always return 1.
discover_product_types
(**kwargs)Fetch product types list from provider using discover_product_types conf
discover_queryables
(**kwargs)Fetch queryables list from provider using discover_queryables conf
do_search
(*args, **kwargs)Should perform the actual search request.
get_collections
(**kwargs)Get the collection to which the product belongs
get_metadata_mapping
([product_type])Get the plugin metadata mapping configuration (product type specific if exists)
get_product_type_cfg
(key[, default])Get the value of a configuration option specific to the current product type.
get_product_type_def_params
(product_type, ...)Get the provider product type definition parameters and specific settings
get_sort_by_arg
(kwargs)Extract the "sortBy" argument from the kwargs or the provider default sort configuration
list_queryables
(filters[, product_type])Get queryables
map_product_type
(product_type, **kwargs)Get the provider product type from eodag product type
normalize_results
(results, **kwargs)Build
EOProduct
from provider resultquery
([product_type, items_per_page, page, ...])Build ready-to-download SearchResult
update_metadata_mapping
(metadata_mapping)Update plugin metadata_mapping with input metadata_mapping configuration
Attributes
DEFAULT_ITEMS_PER_PAGE
extract_properties
plugins
auth
next_page_url
next_page_query_obj
total_items_nb
need_count