stac-fastapi-elasticsearch-opensearch icon indicating copy to clipboard operation
stac-fastapi-elasticsearch-opensearch copied to clipboard

Extending temporal search

Open rhysrevans3 opened this issue 1 year ago • 9 comments
trafficstars

Related Issue(s):

  • #181

Description: Extending temporal search include start_datetime and end_datetime properties

PR Checklist:

  • [x] Code is formatted and linted (run pre-commit run --all-files)
  • [x] Tests pass (run make test)
  • [x] Documentation has been updated to reflect changes, if applicable
  • [x] Changes are added to the changelog

rhysrevans3 avatar Jan 05 '24 14:01 rhysrevans3

@rhysrevans3 This pr looks really good. We have just been in the middle of adding opensearch support. Do you have any experience with opensearch?

jonhealy1 avatar Feb 06 '24 14:02 jonhealy1

@jonhealy1 I've added some more tests but realised the current version of stac-pydantic the api is using doesn't allow a null datetime field. To update to the latest version of stac-pydantic will require changes to both stac-fastapi and stac-fastapi-elasticsearch. I've made the changes to stac-fastapi in this pull request and am working on the changes to elasticsearch. But I think this pull request will have to wait until they're merged.

rhysrevans3 avatar Feb 14 '24 08:02 rhysrevans3

@rhysrevans3 This pr looks really good. We have just been in the middle of adding opensearch support. Do you have any experience with opensearch?

I don't have any experience with Opensearch but am happy merge main's changes into this branch and try to add this functionality to the opensearch parts.

rhysrevans3 avatar Feb 14 '24 08:02 rhysrevans3

@rhysrevans3 Any new thoughts? Hopefully we can merge this soon.

jonhealy1 avatar Apr 08 '24 16:04 jonhealy1

@jonhealy1 update on this pull request:

  • I've added the extended datetime functionality to the opensearch code.
  • I've added some extra tests to meet all the cases I can think of.
  • I've added some comments to explain the database logic. Some of the tests I've added are failing as the current version of stac-pydantic doesn't allow the datetime field to be null. So I'm still waiting on the fast-api pydantic v2 pull request to be merged

rhysrevans3 avatar Apr 09 '24 10:04 rhysrevans3

Hi @rhysrevans3, the pydantic v2 is merged now into main via stac-pydantic if you want to have another look at this. Cheers.

jonhealy1 avatar May 10 '24 10:05 jonhealy1

@jonhealy1 it looks like that stac-pydantic still won't allow a null datetime I thought the validator would allow this but I think the typing stops it. https://github.com/stac-utils/stac-pydantic/blob/main/stac_pydantic/item.py#L31-L58

Good news is there appears to be 3 pull requests that will fix this: https://github.com/stac-utils/stac-pydantic/pull/116 https://github.com/stac-utils/stac-pydantic/pull/131 https://github.com/stac-utils/stac-pydantic/pull/135

Sorry for the delay in this.

rhysrevans3 avatar May 13 '24 08:05 rhysrevans3

Hi @rhysrevans3 - no problems whatsoever - thanks for staying on top of this!

jonhealy1 avatar May 13 '24 10:05 jonhealy1

@jonhealy1 looks like this might be finally ready to merge. :)

rhysrevans3 avatar Jun 03 '24 08:06 rhysrevans3

I think we need @jonhealy1 to re-review

jamesfisher-geo avatar Feb 19 '25 00:02 jamesfisher-geo