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

CMR-10163: Implement Free text search for collection search #352

Merged
merged 6 commits into from
Oct 2, 2024

Conversation

dmistry1
Copy link
Collaborator

Overview

Adds support for free text search functionality for collection search. Users can now search for collections using a query parameter q in GET requests or as part of the JSON body in POST requests.

Key Changes

  1. Implemented free text search in the /collections endpoint
  2. Added support for the q parameter in both GET and POST requests
  3. Modified GraphQL query to include keyword search

Example Usage

GET request:

curl -X GET "http://localhost:3000/stac/PROVIDER/collections?q=MODIS" -H "Accept: application/json"

POST request:

curl -X POST "http://localhost:3000/stac/PROVIDER/collections" \
     -H "Content-Type: application/json" \
     -H "Accept: application/json" \
     -d '{
           "q": "MODIS",
           "limit": 10
         }'

STAC browser:
image

@codecov-commenter
Copy link

codecov-commenter commented Sep 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.83%. Comparing base (70f1ca3) to head (22a24d5).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #352      +/-   ##
==========================================
+ Coverage   87.73%   87.83%   +0.09%     
==========================================
  Files          23       23              
  Lines        1109     1118       +9     
  Branches      238      241       +3     
==========================================
+ Hits          973      982       +9     
  Misses        136      136              
Flag Coverage Δ
?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@daniel-zamora daniel-zamora self-requested a review October 2, 2024 15:00
@dmistry1 dmistry1 merged commit 55915b0 into master Oct 2, 2024
5 checks passed
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.

5 participants