mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-03-10 06:56:09 +08:00
[search-index] Don't removeQuotedHTML when indexing threads
Summary: This is a very expensive operation and there seemed to be few downsides to including quoted portions in the index. We can revisit this to improve how we index when we have a proper scheduler. Test Plan: Run locally Reviewers: juan, evan Reviewed By: evan Differential Revision: https://phab.nylas.com/D3682
This commit is contained in:
parent
357cc854de
commit
d60226f0c6
1 changed files with 1 additions and 5 deletions
|
@ -205,11 +205,7 @@ class ThreadSearchIndexStore {
|
|||
thread.messages()
|
||||
.then((messages) => (
|
||||
messages
|
||||
.map(({body, snippet}) => (
|
||||
!_.isString(body) ?
|
||||
{snippet} :
|
||||
{body: QuotedHTMLTransformer.removeQuotedHTML(body)}
|
||||
))
|
||||
.map(({body, snippet}) => (!_.isString(body) ? {snippet} : {body}))
|
||||
.map(({body, snippet}) => (
|
||||
snippet || Utils.extractTextFromHtml(body, {maxLength: MESSAGE_BODY_LENGTH}).replace(/(\s)+/g, ' ')
|
||||
))
|
||||
|
|
Loading…
Reference in a new issue