What are Queries?
Queries let you search your knowledge base. For example you could filter your tasks with this query:
query: #Unfinished (before:!!today AND #Important OR #Urgent)
(in:[[Project A]] OR in:[[Project B]])
giving you all important unfinished tasks of Project A or Project B that are overdue and urgent.
Search Portals already support basic queries, e.g. searching for [[references]]
, #tags
and `plain text`
. Multiple terms are connected by OR (a result has to just have one of them). Some additional modifiers like isDescendant:
are also supported.
What could queries do? (Query Language/UI)
Here are some examples for features of a query language.
Find
- rems containing a word (or regexp)
- rem containing a reference
- rem tagged with a specific tag
- rem that have a specific type (tags pass on type, which is not a bug, but a feature)
- finished/unfinished todoās
- other power ups
- edit laters
- highlights (e.g. when using colors to mark how difficult a subject was)
- hidden/not hidden
- values of slots
- relations by universal descriptors (
~Example
s of something) expressing some logical connection - logical operators: rem that satisfy two conditions (above) connected by AND or OR or that do NOT satifsy something
- card data
- previously wrongly answered cards
- overdue cards
- card types (concept, descriptor
- network relations
- documents containing two references somehwere
- all children of a rem or all ancestors max N levels deep
- chains of references (what is the shortest path from Concept X to Concept Y)
Modify the output:
- sort
- ascending/descending
- alphabetically
- by creation/last edit time
- count
- show any/the first result
- top 10
- show children to depth D
- show parents
Your Queries?
I am interested in
- query features you like (that I missed above or that you find most important) as well as
- concrete use cases you want to search for and
- how youād like to search for them (query language or UI).
Go as crazy as you can here. āGive me #urgent
#Todos
of [[Project X]]ā is boring. We want to explore the boundaries of what is possible.
References
- Relevant Feature Request: Ability to use logical operators for searching (Queries)
- Trilium Search which also supports relations: https://github.com/zadam/trilium/wiki/Search
- Roam Research Queries: How to query in Roam