Beta5 included the usual bugfixes and improvements to memory usage. It also included a new feature that assists with search results display. The feature allows you to fetch the character ranges of all terms in a text field that were matched by a search result.
This feature isn't as simple as it sounds, due to the search engine's ability to infer relevant document terms by spell correcting, stemming or synonym expansion of query terms. This means that terms matched in a document aren't necessarily the same as those in a query. The new character range fetching exposes this information so you can clearly highlight the term "test" in a document that matched the search term "testing", for example.
Here are some more examples. Assume a note contains the line of text:
These notes are just for testing.
Each of these search queries would match this note by the highlighted terms:
- "test note" : These notes are just for testing.
- "test notr" : These notes are just for testing.
- "I am not testing" : These notes are just for testing.
i.e. the same document terms were matched by each query, however in some cases stemming or spelling correction was required to get the match.
Another example: consider a note containing this line of text:
My Christmas list
With an explicit synonym defined to expand "xmas" as "christmas", a search for "xmas" would match the document on the term "christmas":
- "xmas" : My Christmas list
Using the character range fetching feature for matching search terms gives you the information needed to highlight or find search terms in your documents. This is demonstrated in Locayta Notes 2.0 (free in the App Store). The screenshots above are from Locayta Notes, demonstrating the examples.