Week 2: Project Search Engine

I spent the week making more filters.

  1. Upgrade tags filter to handle negation
    eg. tag:cat -tag:dog
    So now you can combine them together like so
    eg. tag:office or tag:important -tag:spam

  2. Implement notebook filter

    notebook1
    │   some_note.md
    │   another_note.md
    │
    └───notebook11
    │   │   nested_note.md
    │   │
    │   └───notebook111
    │       │   nested_nested_note.md
    │       │   ...
    │   
    notebook2
    │   random_note.md
    │   random_note2.md
    

    notebook:notebook1 limits search to notebook1
    (Including notebooks nested inside notebook1 such as notebook11 and notebook111)

    You can also do negation.
    -notebook:notebook11

  3. Implement date filter
    created:YYYYMMDD and updated:YYYYMMDD to search for notes created or updated on that date.
    It also supports smart values: day, week, month, year
    created:day-0 notes created today
    created:day-1 notes created today or yesterday
    updated:day-5 notes updated within the past 5 days
    updated:week-2 notes updated within the past two weeks.
    created:month-3 notes created within the past 3 months.
    updated:year-0 notes updated this year

  4. Implement todo filter
    todo:* show all todos
    todo:true show completed todos
    todo:false show uncompleted todos

7 Likes

Hi,
will -tag:* work to find all notes without a tag?

No. Neither will tag:* show all notes with tags. But I can implement it if you want.

todo:*

I think this option is a bit confusing. If we want to filter by note type, we should perhaps have something like is_todo:1. Then it can be 0 too to get only notes.

But I agree we could have tag:* and -tag:* to retrieve all notes with and without tags.

1 Like

Also should we use true/false in general or just 1/0? Personally I’d prefer 0/1 as it’s shorter and if everything’s a number I don’t need to wonder if one field accept 0/1 or true/false. On the other hand I don’t know how user friendly it is for non technical people.

Yeah, that would be great!

The true/false syntax is from Evernote.

How about is:todo and is:note?

2 Likes

I would like to see a boolean search for tags (and, or, not - and combinations).

Hello
WIll we have option for saving searches or a history of searches?

That’s not in the current project scope but I agree that it would be useful.

1 Like

That’s already possible with the current implementation.

1 Like

The list of latest searches used to be listed in the sidebar but I thought it wasn’t useful so I’ve removed it. Maybe we could put it back in some form or another.

1 Like

I think something like this can be useful if these searches can be persisted. Or dare I say even synced across devices.

Something like “All open todo items” can be quite useful (and I’ve seen this requested here). Or I’d love to have “All notes created this week” for GTD-style weekly review.

1 Like

Ok, I remember that people were complaining that boolean search on tags was not possible… Maybe I missed a commit or so…

I meant the current implementation that I did for gsoc. Not the existing Joplin search implementation.
Sorry for the confusion.