Home / GitHub Page

Week 3: Project Search Engine

Add new filter is and iscompleted to replace todo filter.

So now you can :

  • Filter by todo using is:todo
  • Filter by notes using is:note
  • Filter by completed todo using iscompleted:true (you can use true/1/yes)
  • Filter by uncompleted todo using iscompleted:false (you can use false/0/no)

I also added support for multiple notebooks.
notebook:nb1 notebook:nb2

Wouldn’t it be better to replace notebook with in?
in:nb1 in:nb2

1 Like

love what you are working on, thanks. my $.02, i prefer less typing where possible so i think ‘in’ is better and understandable.

2 Likes

Thanks for the update @naviji. As mentioned in another thread, it would be a good idea to create a table of supported query terms and update it as you progress.

you can use true/1/yes

I think picking only one of these would make for a more robust implementation. Any variant we allow here will have to be maintained permanently afterwards and it’s not really worth it in this case as users can learn what boolean form we support.

So let’s be strict on the format we accept - I have a preference for 0/1 everywhere, but true/false for booleans is reasonable too, so please pick one. If user enters a format you don’t support that’s an error.

Yes, I’ll do that.

you can use true/1/yes

Stackoverflow uses boolean operators like this. https://stackoverflow.com/help/searching

The following search operators can be used with values of yes/no, true/false, or 1/0 (each pair behaves the same):

I also prefer 0/1. Let’s use that everywhere then.

2 Likes