Skip to content

Datetime filter #391

@GrzegorzPustulka

Description

@GrzegorzPustulka

Describe the bug
If we make a query using a datetime filter, the query searches for the given date between datetime or start_datetime, end_datetime or start and end_datetime. Below I'm including what the query looks like that the apply_datetime_filter function applies. This seems pointless to me - the user is asking about datetime, not about start_datetime and end_datetime fields. If the user is supposed to be able to search by these fields, they need to be added as separate search fields.

[Bool(filter=[Range(properties__datetime={'gte': '2016-05-23T10:41:10Z', 'lte': '2016-06-23T10:41:10Z'})]), Bool(filter=[Range(properties__start_datetime={'gte': '2016-05-23T10:41:10Z', 'lte': '2016-06-23T10:41:10Z'})]), Bool(filter=[Range(properties__end_datetime={'gte': '2016-05-23T10:41:10Z', 'lte': '2016-06-23T10:41:10Z'})]), Bool(filter=[Range(properties__start_datetime={'lte': '2016-05-23T10:41:10Z'}), Range(properties__end_datetime={'gte': '2016-06-23T10:41:10Z'})])]

To Reproduce
http://127.0.0.1:8080/search?collections=sentinel-2-l2a&datetime=2016-05-23T10:41:10.947Z/2016-06-23T10:41:10.947Z

Expected behavior
The API should return only dates between datetime and datetime, not use start_datetime and end_datetime

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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy