pulsar-edit / package-backend

Pulsar Server Backend for Packages
https://api.pulsar-edit.dev
MIT License
11 stars 11 forks source link

Keyword Search Support #264

Open confused-Techie opened 1 week ago

confused-Techie commented 1 week ago

Requirements

Description of the Change

As referenced in #206 we discussed how to allow users to search tags of packages, including tags that exist only on this platform.

In my reply there I detail several steps that would be needed to begin to support this kind functionality.

With the first step possible being one that enables the generic searching of details within the package.jsons keywords array at all. Which is exactly what this PR does.

Although unfortunately this PR doesn't support searching this field just yet, it will match with any exact matches just fine.

This new functionality is exposed via the query parameter tags on the following endpoints:

This will allow exact matches to be found for any existing packages data in the keywords array from the package.json. An example request would look like: