Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add free-text search extension #162

Merged
merged 9 commits into from
Jan 22, 2025
Merged

add free-text search extension #162

merged 9 commits into from
Jan 22, 2025

Conversation

hrodmn
Copy link
Collaborator

@hrodmn hrodmn commented Oct 17, 2024

Related Issue(s):

Description:
This is a pretty simple addition but it is dependent on the next release of pgstac (the pgstac-side changes were added in stac-utils/pgstac#295) so the new test will fail until we decide how to conditionally activate this feature. Would it make sense to only activate this extension if the pgstac version is >0.9.1?

The q parameter should probably never be used in an item search because it will probably slow things down a lot, but it is very useful for the collection search function.

PR Checklist:

  • pre-commit hooks pass locally
  • Tests pass (run make test)
  • Documentation has been updated to reflect changes, if applicable, and docs build successfully (run make docs)
  • Changes are added to the CHANGELOG.

@vincentsarago
Copy link
Member

@hrodmn I would love to first finish #155 which I think is going to be dependent on 0.9.2 (at least on the tests side)

@hrodmn hrodmn force-pushed the feature/free-text branch from e5393c3 to 5f67ec9 Compare January 2, 2025 12:33
@hrodmn
Copy link
Collaborator Author

hrodmn commented Jan 2, 2025

Now that pgstac 0.9.2 is released (with support for the q free-text parameter) I wanted to kick the tires on this PR! The tests will only pass if we are running pgstac >= 0.9.2 so I'm not exactly sure what that means for releasing this feature.

@vincentsarago
Copy link
Member

The q parameter should probably never be used in an item search because it will probably slow things down a lot, but it is very useful for the collection search function.

@hrodmn should we then remove it from the extensions_map list ?

if we keep it, could you add some tests for it? 🙏

@hrodmn hrodmn marked this pull request as ready for review January 22, 2025 12:14
@hrodmn
Copy link
Collaborator Author

hrodmn commented Jan 22, 2025

should we then remove it from the extensions_map list ?

Yes, I think removing it from the list of item search extensions by default is the way to go. Users could add it in custom applications if it would be helpful. It's all supported in core.py so I should add some tests to make sure it is working correctly.

Update: Actually free-text for item search is not really supported because pgstac will only search through the description, title, and keywords fields which are not even in the STAC item spec. I will remove the q parameter from the item search request methods to avoid confusing people.

@vincentsarago vincentsarago merged commit af98395 into main Jan 22, 2025
7 checks passed
@vincentsarago vincentsarago deleted the feature/free-text branch January 22, 2025 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants