mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-11-10 00:11:34 +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()
|
thread.messages()
|
||||||
.then((messages) => (
|
.then((messages) => (
|
||||||
messages
|
messages
|
||||||
.map(({body, snippet}) => (
|
.map(({body, snippet}) => (!_.isString(body) ? {snippet} : {body}))
|
||||||
!_.isString(body) ?
|
|
||||||
{snippet} :
|
|
||||||
{body: QuotedHTMLTransformer.removeQuotedHTML(body)}
|
|
||||||
))
|
|
||||||
.map(({body, snippet}) => (
|
.map(({body, snippet}) => (
|
||||||
snippet || Utils.extractTextFromHtml(body, {maxLength: MESSAGE_BODY_LENGTH}).replace(/(\s)+/g, ' ')
|
snippet || Utils.extractTextFromHtml(body, {maxLength: MESSAGE_BODY_LENGTH}).replace(/(\s)+/g, ' ')
|
||||||
))
|
))
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue