Create custom Filters (Search Queries or Places)

Overview:

I would like to propose a feature that enhances the organizational capabilities of Bear by allowing users to create custom filters (search queries or places). This feature would significantly improve user experience, particularly for those with extensive tag systems and specific search needs.

What:

  • Custom Filters: The ability to create custom filters that act as saved search queries.
  • Filter Attributes: Each filter would have an icon, name, and associated search query.

Why:

  • Enhanced Organization: Custom filters would help users manage and declutter large tag systems.
  • Efficient Workflow: Users could save time by accessing complex searches with a single click, eliminating the need to manually input search queries repeatedly.

How:

  • Sidebar Integration: These filters would live in the sidebar, above the tags or within the notes section, making them easily accessible.
  • Saved Search Commands: Users can define filters using combinations of tags and advanced search commands (e.g., exclusions with -, "phrases" in quotes, and special search attributes like @today, @done, @pinned, etc.) as listed in the following documentation:

Examples

Here are some simple examples to illustrate how this feature could be used:

// Filter that shows all work-related tasks that are not done

> "overdue" [query:#work -@done]
// Filter that shows Personal Project Tasks, such as hobbies

> "in free-time" [query:#personal #project @todo]
// Filter that shows all Python example code from a specific person 

> "tim's code examples" [query:#person/tim #python @code]

Advanced Nesting Example:
The ability to nest filters would further enhance their utility:

// Filter for your daily journal that shows the days you tracked a good or excellent mood

> "happy days" [query:#daily log# #mood/good #mood/excellent]
	> "last 7 days" [query:@happy days@ @created7days]
	> "last 30 days" [query:@happy days@ @created30days]
	> "gallery" [query:@happy days@ @images]
1 Like

Plus one. Has been requested several times

Bear also offers a number of special search options to suit different scenarios.

  • @images shows notes that contain images
  • @todo shows notes with incomplete todos
  • @date shows notes created or modified on a specific date

Please note: For @date and @cdate (the creation date of a note), there is no space between the command and the parenthesis. For example, try copying @cdate(202201) into your Bear search box and the results will show all notes created in January 2022.

You could also use keyboard - text replacement to help in this situation. I replaced @last7days with L7 in my search function. You could do something like L30 to replace @last30days. Just a thought.