Really the biggest aspect of development was implementing the smart similarity search. This wasn't some huge
efficient super search project, so it's definitely not the most efficient. However, it works pretty well for its intensive purposes!
The way this search works is by tokenizing the search phrase, and then searching every note for those tokens with a few rules:
- A value to a found token in a note is weighed in terms of both frequency, as well as importance.
If a value is found multiple times, that weight goes up in a linear fashion. If that weight goes up
in importance (i.e. if its in the note title, subject, or content), then that weight goes up in an exponential fashion
- Token sequences are also considered too. The more tokens that are found in successive order that matches with
the search phrase, the more the weight increases for that search value in an intensely exponential fashion
Because of this, the search phrase similarity tends to have far stronger weights the more similar the content is to the search phrase
in terms of both pattern matching, grammar, and frequency. These weights can be adjusted for personal preference, but this largely follows
the trend of the more a note talks about or focuses on the search phrase, the more likely it is that the note is what we are looking for.