Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JAMES-2080 Allow turning off header indexing in OpenSearch #1516

Merged
merged 2 commits into from
Apr 13, 2023

Conversation

chibenwa
Copy link
Contributor

@chibenwa chibenwa commented Apr 11, 2023

Indicates if you wish to index headers or not (default: true). Note that specific headers (From, To, Cc, Bcc, Subject, Message-Id, Date, Content-Type) are still indexed in their dedicated type. Header indexing is expensive as each header currently need to be stored as a nested document but turning off headers indexing result in non-strict compliance with the IMAP / JMAP standards.

Before

Indexing 5.000 mails takes ~1 minute and occupies 26MB of index (5KB perf mail) which is consistant with our production mertics. The commit log is more bulky and with index occupies 185 MB.

After

Indexing 10.000 takes ~ 76s and occupies 6.9 MB of index (690 B / mails). The commit log is more bulky and with index occupies 62 MB.

Conclusion

This change allows a dramatic space reduction on OpenSearch (cost saving!) of ~ x8 for the tested workload. We also observed a x2 speedup of the indexation process.

@chibenwa chibenwa marked this pull request as ready for review April 11, 2023 06:52
Indicates if you wish to index headers or not (default: true).
Note that specific headers (From, To, Cc, Bcc, Subject,
Message-Id, Date, Content-Type) are still indexed in their
dedicated type. Header indexing is expensive as each header
currently need to be stored as a nested document but turning
off headers indexing result in non-strict compliance with the
IMAP / JMAP standards.
@chibenwa chibenwa merged commit 3217d0c into apache:master Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants