Search Syntax Documentation

Hi,
so if I understand correctly, I have to use "Basic Search" to search for open checkboxes: /"- [ ]"
Using basic search means I cannot use any of the search logic, e.g. like: notebook:A
Therefore, it is not possible to define a search for: "notes with open checkboxes in notebook A"?

I think it is critical to allow such simple combinations.
Maybe we could introduce at least a special searchterm for checkboxes?
For example: checkbox:0 for incomplete checkboxes and checkbox:1 for completed checkboxes.

2 Likes

Making the search logic work with "basic search" shouldn't be that difficult. I'll look into it.

2 Likes

Any news on this? I really really miss the possibility to search for open checkboxes in certain notebooks. Especially since there are embedded search and saved search favorites now :slight_smile:

1 Like

The questions raised above do all look quite valid, while the search feature is already nice as it is. But one thing strikes me, like it does in many other apps, and other software products.
Any user compelled to repeat the same steps 16 - 64 times a day knows it. The command or sequence of commands works just fine, but the number of mouse clicks or key strokes to be repeated over and over again is a pain.

If I want to search for X in the title, do I really have to type
t i t l e : X, .... using 8+ keys ?

Or could it be t/X or anything else that works and is as short as possible ? I cannot imagine that adherence to a standard set elsewhere really matters. If it does ... could we implement title: (etc.) for the good and bad, and t/ for the ugly ?

2 Likes

Hey,
can I also exclude sub notebooks from a search?
I have the following notebook structure

Notebook
    Task 1
    Task 2
   Subnotebook
        Task 3
        Task 4

And I don't want Task 3 and Task 4 to appear in my search
I tried:

notebook:"Notebook" -notebook:"Subnotebook"

But I don't get what I expect

The problem is that the notebook filter was not allowed to be negated.

I've made a PR with the fix. Should be merged soon.

4 Likes

Super cool, thank you so much!

Combined with the embedded search plugin, your contribution to Joplin really has made a difference! Thanks!

Coming back again to my issue, I wonder if it was also possible to disable the search in all subnotebooks, e.g. by introducing a flag like search_recursive: False.

How can I search for ->? When I search for body:"->" it doesn't return pages containing the phrase, although I know for sure that I have plenty of them. It instead returns some random pages.

From the documentation

One drawback of Full Text Search is that it ignores most non-alphabetical characters.

https://joplinapp.org/#searching

Use this search query: /"->"

1 Like

I totally agree. Searching for completed / incompleted checkboxes in combination with notebooks (other search combinations too) would be a great feature. In my use case it would improve significantly the implementation of David Allens "Getting Things Done" (GTD) with Joplin. Is there any news about that feature? Thank you in advance :slight_smile:

Hi !

I did note that the standard behavior does not include searching for chunks of text in words but I would need to do that. Is there a way to get around it?

Example: searching for "équipe" will return "réunion d’équipe" "équipage" "équipement"...

Try équipe*

Don’t works

I think we strip off the accents when indexing the content, so equip* might work.

In that case maybe it's worth stripping them from search query too?

equip* or équip* does not work...

By default all the search terms will be connected by and in the backend ( notebook is the only exception). Use the any operator if you want the search terms connected by or instead.

Multiple notebooks can also be specified since they are connected by or always (ignoring the any operator).

notebook and any seems pretty weird in general. Maybe a note to not combine the two would be helpful.

I ran the tests below with with 1.8.5 on Windows.

notebook:nb1 notebook:nb2 returns the expected notes of nb1 or nb2.

any:1 notebook:nb1 notebook:nb2 returns nothing. The any:1 should be redundant, and I expected the same result as the above.

notebook:nb1 tag:tag1 returns notes in nb1 and has the tag tag1; ie, this is an and search. "notebook is the only exception" led me to think searches involving notebook defaults to an or search. I expected notes in nb1, or has the tag tag1 irrespective of its location.

any:1 notebook:nb1 tag:tag1 returns the same results; ie, this is an and search. I expected the any:1 to be an explicit request to perform an or search, and return notes in the notebook nb1, or has the tag tag1 irrespective of location.

any:0 notebook:nb1 tag:tag1 returns nothing. This should be an explicit request to perform an and search. I expected notes in nb1 with the tag tag1.

any:1 notebook:nb1 and any:0 notebook:nb1 both return nothing. I expected the any: to be superfluous return the notes in nb1

1 Like

how can I negate that? I want all notes with "#" but w/o "@".
"# -/@" doesn't work

Having a search function like Anki would be really cool.

In Anki: The Shift-Key is the AND-operator. If you click on a tag and on a notebook (=card-deck in anki) it searches for the tag AND the card-deck. If you hold Ctrl.-Key it behaves as a OR-operator. If you hold the Alt-Key and click on a tag, the search is negated.

So clicking on tag:animal and after it on deck:zoology with Ctrl.+Alt and after it on deck:cars will create the search string, which is displayed as:
"tag:animal" AND -"deck:zoology" OR "deck:cars"

So you don't need to memorize the name of the search-commands and you can seach more quicker by just pressing keys and click on notebooks/tags.