Skip to content
This repository was archived by the owner on Aug 3, 2022. It is now read-only.

ItemDescription facet restructure #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
__license__ = 'BSD - see LICENSE file in top-level package directory'
__contact__ = '[email protected]'

from asset_scanner.core.processor import BaseAggregationProcessor
from asset_scanner.core.aggregation_processor import BaseAggregationProcessor
from asset_scanner.core.item_describer import ItemDescription
from asset_scanner.core.types import SpatialExtent, TemporalExtent
from elasticsearch import Elasticsearch

Expand Down Expand Up @@ -260,7 +261,7 @@ def get_extent(self, file_id: str) -> Dict:

return extent

def run(self, file_id: str, description: 'ItemDescription') -> Dict:
def run(self, file_id: str, description: ItemDescription) -> Dict:
"""
Run the processor
:param file_id: Collection ID to aggregate on
Expand All @@ -271,7 +272,7 @@ def run(self, file_id: str, description: 'ItemDescription') -> Dict:

if self.aggregate:
# Get list of aggregation facets and extra top level facets
facets = set(description.facets.aggregation_facets + description.facets.search_facets)
facets = description.facets.collection_facets

# Poll elasticsearch for value list for each facet
summaries = {}
Expand Down