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 searchStarterPacks to appview #2978

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Conversation

rafaelbsky
Copy link
Contributor

@rafaelbsky rafaelbsky commented Nov 11, 2024

This adds:

  1. The lexicon app.bsky.graph.searchStarterPacks and its implementation in the bsky package.
  2. The lexicon app.bsky.unspecced.searchStarterPacksSkeleton, to be implemented by the search service.

@rafaelbsky rafaelbsky force-pushed the starter-pack-search branch 2 times, most recently from ec2861c to d522841 Compare November 12, 2024 15:10
@rafaelbsky rafaelbsky marked this pull request as ready for review November 13, 2024 02:59

async searchStarterPacks(req) {
// @NOTE we don't store the term in the db, so we can't search by it.
const { term: _term, limit, cursor } = req
Copy link
Contributor Author

@rafaelbsky rafaelbsky Nov 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what to do with the term here, since we don't have the starter pack name stored in the appview. I think the search service will have it though, so that's why it exists.

I'm happy to change it to something better.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We certainly could store the starter pack name in the db! How is it handled for post and actor search? Ideally we'd follow a similar pattern to those two if there is a pattern.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a search by term with a gin index. I'm doing ilike, not sure if it is a good usage of the index or how much we care about it.

Copy link
Collaborator

@devinivy devinivy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! The only thing we might want to consider here is indexing the starter pack names so that some form of search is implemented in the dataplane.

Copy link
Collaborator

@devinivy devinivy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P.S. let's add a changeset for the @atproto/api package to this PR, so that a version of that package containing the new search lexicon can be published.

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