[ ] have a debug mode that allows seeing a debug reasoning for the components of query rank
[ ] Rank cards in more baked sections higher
[x] Make it so the logic to filter and rank sets in find is also done primarily via selectors
[x] Figure out a way to do less processing when query is being typed (maybe only dispatch the updateQuery after debouncing?) Will need to split the actual query to process from just query; currently that's what makes it show up in the UI, too.
[x] Factor out the logic in selectActiveFilters in selectors into a reusable bit (or make it so the set of cards that have the rank applied are based on a pre-filtered set that's selected)
[x] Actually use filters to filter the set in selectExpandedCollectionForQuery
[x] Replace things like 'has:comments' with 'filter:has-comments'
[x] strings like 'hill-finding' should match 'hill finding' (but the former should could for more in the match than the latter)
[x] Depending on the performance of creating the index, only create it when we start having a query for the first time (and from then on keep it updated)
[x] Use the word index to filter down cards that don't match before scoring
[x] The pre-broken into words should be cached per card
[x] Check the performance with and without the index, after debouncing. If it's not necessary, then roll back 90579cf49b53a23e7178c378db4ae19226d67db9 , eff90573b51c99547ca3023a420d7cbe8c64964a , and ada9e1c568540c798de7c8712a42225414562a67 since the memory increase for the full substring index won't be worth it
[x] normalizeWords should strip out punctuation (optionally, since queryString processing uses it)
[x] use normalizedWords in the matching logic of cardScoreForQuery to match across runs of atypical whitespace
[x] Ideally search should be over the innerText, not html (might be as simple as removing tags)
[ ] support literal multi-word strings--words in the query that are in quotes are returned as a single word from queryWordsAndFilters
[x] Support things like has-comment and othe roperators. prepareQuery returns an object containing query pieces and operators and the like
[x] Ideally if there are multiple words in the query then it should match all of them, but if it doesn't, match if all of the individual words do
[x] Cards that only match a subset of words are also returned, just styled differently. And ideally those are ranked based on whether the interesting (e.g. non-stop-words) words match most. Use card-drawer's ability to pass a map of cards that only partially match, and have the query machinery pass extra information to derive that (rename the cards-to-fade to something more general than cardsToRemoveOnPendingFilterCommit)
[ ] don't match title cards
[ ] Have cached queries that as new documents come in on or are updated they're reevaluated. Use those to power collections
[x] Have an index of cards in state that pre-processes cards based on e.g. all lower case, removing tags, etc.
[ ] First check for parts of the query that knock out other things, like a failed section restrict, so we can bail early
[ ] Reuse filter logic from #60. (But of course with different names, like 'is:starred' since otherwise it would be hard to distinguish it from a normal word in the query)
The text strings that are done in the find dialog, but also ideally an intermediate representation that can run across the cards list quickly.
Originally captured in #12.