Skip to content

Custom Mappings and Custom Sortable Fields List #579

@YafetBF

Description

@YafetBF

Sortable fields
A new approach is included regarding custom mappings. With custom mappings if we include new field as keyword, sorting based on that specific field is necessary. Sortable fields are already defined in the database_logic. However, the number of fields are limited to four only. Adding new field into sortable fields can be considered from the environmental variables after custom mappings are applied.
Example: - COLLECTIONS_SORTABLE_FIELDS=id,extent.temporal.interval,temporal,title

Custom Mappings from Config File
A custom mappings json template similar to the default template can be stored in config folder. Users can easily edit and apply it from the environmental variables. The sample config json is important to highlight general structure of the mappings json. This is traceable and can be used as master template.
Example: - STAC_CUSTOM_MAPPINGS_PATH=/app/stac_fastapi/config/config_mappings.json

Alternatives I've considered
The above two features are demonstrated in a pull request here #577

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions