Search Notes - piotrpdev/notes-app GitHub Wiki

Instructions

NOTE: You can use this method to search for a single, or multiple notes. I will be mostly referring to this using just "note" for simplicity.

To search for a note (or notes) in the system, select option 6 in the menu and fill out details about the note.

You will initially be shown a list of all the notes in the system, at this point you will have to choose how you want to search for a note.

Searching Methods

You have two ways of searching for a note, you will be asked if you want to perform these, in order:

  • Index - Enter the index of the note you want to include in the search
  • Filter - Look for a note with a specific property value e.g. with priority 1

These can both be performed multiple times in a search, however once you decide to filter once, you cannot go back to selecting notes by index.

This is because the searching is done subtractivly, e.g. we start with all the notes and eventually boil the list down to a select few.

TIP: Because of the above, you can entirely skip the Index search method by saying no, and filter the entire list of notes.

Filtering

You can filter by any of the note properties including the date when it was created, and the date it was last updated.

NOTE: If you decide to search using a title, you don't have to worry about using the exact string. The search only checks if what you entered is contained in the title e.g. it does not have to match exactly (casing also doesn't matter).

After you finish filtering the notes, you will be asked if you want to sort them. You can sort by any of the notes' properties.

Outcomes

If everything works successfully, you will be shown the notes that match your entered criteria.

If something goes wrong (when you enter an invalid value for example), you will be prompted to enter a correct value.