lemmy icon indicating copy to clipboard operation
lemmy copied to clipboard

Add search by instance domain to community search

Open gapetto opened this issue 4 months ago • 2 comments

Requirements

  • [x] Is this a feature request? For questions or discussions use https://lemmy.ml/c/lemmy_support or the matrix chat.
  • [x] Did you check to see if this issue already exists?
  • [x] Is this only a feature request? Do not put multiple feature requests in one issue.
  • [x] Is this a backend issue? Use the lemmy-ui repo for UI / frontend issues.
  • [x] Do you agree to follow the rules in our Code of Conduct?

Is your proposal related to a problem?

Community search is only search by name. Expanding that to also search by instance domain would make the app much more usable.

Currently lemmy demands from us remembering communities names, which is pretty much impossible given the amount of them. If we don't remember community name, which happens a lot of time, we have to go to that instance original website to recall it which is time consuming, we should be able to quickly get that info from our instance

Describe the solution you'd like.

Typing part of instance domain should be enough, so for example typing "world" should show all communities that have world in name, but also all lemmy.world communities in same list later.

There could be checkboxes in settings above to check if we want to include search by insance name and/or search by community name, and default check could be set in our instance admin settings

Describe alternatives you've considered.

Additional context

No response

gapetto avatar Sep 17 '25 10:09 gapetto

The search api takes a parameter community_id (not a plain name string). So this could be implemented by adding a parameter instance_id, with search by domain implemented in the frontend (similar to the selection for instance block).

Very similar to https://github.com/LemmyNet/lemmy/issues/5947

Nutomic avatar Sep 17 '25 10:09 Nutomic

I guess we need to start adding instance_id filters to some endpoints, like post/list, and search.

But I have a few other question:

  • Should we make Instances a searchable type, so that dropdown selects can search for them, and then the APIs could just take in an instance_id instead of instance_domain ?
  • An instance_id filter would conflict with ListingType, which has All, Local, Subscribed, ModeratorView and Suggested . With an instance filter, not all of those would be exclusive, for example Subscribed could be used with an instance_id filter, to show only posts from subscribed communities and that instance.
    • So we'd probably need to rethink ListingType... Probably just making subscribed, moderator_view, and suggested booleans, and then changing ListingType to enum InstanceType { All, Local, InstanceId(instance_id) }

dessalines avatar Sep 17 '25 14:09 dessalines