Add syntax to filter objects/relations/types/tags to the search

Is your feature request related to a problem? Please describe.

It would be great now that we have many types/relations and various objects (that sometimes have similar names) to be able to use some sort of syntax within the search function.

Describe the solution you’d like

For example :

typename:XXXXXX ===> would bring up a specific object type only

tag:XXXXXXX ===>would bring up objects with specific tags

relationname:value XXXXXXX ===> would bring up items with a specific value in a specific relation

Describe alternatives you’ve considered

have dropdown menus with filters ? maybe both?

Additional context

I don’t think this is a priority feature since it really is a quality of life thing but it could really power up the search function

21 Likes

This would be an extremely useful feature. And I like the proposed syntax, very similar to what currently exists in Discord.

3 Likes

E.g.

  • Have @Book legend or type:Book legend be a search for “legend” that only returns Book-type results.
  • Have legend #romance or legend tag:romance be a search for “legend” that only returns objects that have romance as a tag (in any of their tag relations).
  • Have legend !zelda or legend not:zelda be a search for “legend” that excludes (or ranks lower) objects that also mention “Zelda”.
  • Have $legend or title:legend be a search for objects with “legend” in their name/title, ignoring everything else.

This would be especially useful when filling object relations. Imagine filling the Invitees field of an Event or Meeting object, and being able to enter #colleague to narrow down the suggestion list, or even just type:Human. (Assuming you don’t want to invite suggestions like “Cognitive Behavioral Therapy” or “Court of Queen Anne” to your party.)

Just these four limitations would be very useful, without needing to go so far as to implement full Boolean search or queries on all relations.

3 Likes

This has been raised already over [here]( Add syntax to filter objects/relations/types/tags to the search ). We could merge this into the exisiting one

The more I use Anytype, the more I think that having a far more robust search function is essential: we don’t really have a way to order and group pages to make them easy to find, so single pages can be easily lost. Plus, the ‘tag’ relation isn’t terribly useful as is at the moment, and being able to search for ‘all pages with [a tag]’ (or more, maybe!) would make them actually usable for more than just cataloguing. The suggestions above are very good and intuitive to use.