Commit graph

7 commits

Author SHA1 Message Date
Juan Tejada
4f8ad70d60 fix(search): Update local search syntax to include more results
Add prefix search. Previously, if searching for a thread with a specific
subject, you had to type the entire subject. Searching for just a prefix
wouldn't return the result.
This should not affect any of the current search results, only add more results
2016-09-28 11:06:10 -07:00
Juan Tejada
42bce855ed fix(search): Prevent from adding duplicate threads to the search index
- We have to manually check if we are inserting a thread to the index
that already exists because the virtual table does not support unique
indexes
- Add versioning to the index to be able to rebuild it for the next
update
2016-06-07 14:41:39 -07:00
Ben Gotow
41ae914b9d fix(lint): Various linter fixes 2016-05-06 16:23:48 -07:00
Juan Tejada
317f9be93d feat(thread-search): Make thread search indexing smarter
Summary:
- When accounts change, make sure sync has completed, and only add or
remove threads from the index based on accounts that were added or
removed instead of rebuilding the entire index from scratch

- When thread is updated, make sure to only update the index for threads
that belong to accounts that are not currently in the sync process

- Add more logging and docs

Test Plan: TODO

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2852
2016-04-07 09:57:29 -07:00
Juan Tejada
18aa0f2bb8 fix(thread-search): Correct typo 2016-04-05 13:29:25 -07:00
Juan Tejada
5a8f8b9877 fix(thread-search): Only rebuild index when # of accounts has changed 2016-04-05 12:16:32 -07:00
Juan Tejada
fc489e5db3 feat(thread-search): Add client side search
Summary:
This diff includes several updates:
- Update sqlite version to use FTS5
- Adds new methods to DatabaseStore to create and update Search Indexes
- Currently indexing subject, participants, and thread message bodies or snippets if the body is not available
- Update initial sync to fetch 5000 message bodies per account
- Adds a new SearchMatcher
- Add new thread-search-index package to run in the worker window to
  init and keep thread search index up to date
- Converts Thread to ES6

TODO:
- Remove/Update suggestions dropdown
- Add tests

Test Plan: - TODO

Reviewers: evan, bengotow

Reviewed By: evan, bengotow

Differential Revision: https://phab.nylas.com/D2826
2016-04-04 17:15:19 -07:00