You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by bt...@apache.org on 2022/05/23 02:47:33 UTC

[james-project] 04/10: JAMES-3769 Add comments for search overrides in elasticsearch.properties

This is an automated email from the ASF dual-hosted git repository.

btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 837d784e037a071f89b59dc1715e5024daa9a858
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Mon May 9 12:22:30 2022 +0700

    JAMES-3769 Add comments for search overrides in elasticsearch.properties
---
 .../sample-configuration/elasticsearch.properties   | 21 +++++++++++++++++++++
 .../sample-configuration/elasticsearch.properties   | 21 +++++++++++++++++++++
 2 files changed, 42 insertions(+)

diff --git a/server/apps/cassandra-app/sample-configuration/elasticsearch.properties b/server/apps/cassandra-app/sample-configuration/elasticsearch.properties
index 74e5a3d57b..9c2033c4fb 100644
--- a/server/apps/cassandra-app/sample-configuration/elasticsearch.properties
+++ b/server/apps/cassandra-app/sample-configuration/elasticsearch.properties
@@ -82,3 +82,24 @@ elasticsearch.http.port=9200
 elasticsearch.metrics.reports.enabled=true
 elasticsearch.metrics.reports.period=30
 elasticsearch.metrics.reports.index=james-metrics
+
+# Search overrides allow resolution of predefined search queries against alternative sources of data
+# and allow bypassing ElasticSearch. This is useful to handle most resynchronisation queries that
+# are simple enough to be resolved against Cassandra.
+#
+# Possible values are:
+#  - `org.apache.james.mailbox.cassandra.search.AllSearchOverride` Some IMAP clients uses SEARCH ALL to fully list messages in
+# a mailbox and detect deletions. This is typically done by clients not supporting QRESYNC and from am IMAP perspective
+# is considered an optimisation as less data is transmitted compared to a FETCH command. Resolving such requests against
+# Cassandra is enabled by this search override and likely desirable.
+#  - `org.apache.james.mailbox.cassandra.search.UidSearchOverride`. Same as above but restricted by ranges.
+#  - `org.apache.james.mailbox.cassandra.search.DeletedSearchOverride`. Find deleted messages by looking up in the relevant Cassandra
+# table.
+#  - `org.apache.james.mailbox.cassandra.search.DeletedWithRangeSearchOverride`. Same as above but limited by ranges.
+#  - `org.apache.james.mailbox.cassandra.search.NotDeletedWithRangeSearchOverride`. List non deleted messages in a given range.
+# Lists all messages and filters out deleted message thus this is based on the following heuristic: most messages are not marked as deleted.
+#  - `org.apache.james.mailbox.cassandra.search.UnseenSearchOverride`. List unseen messages in the corresponding cassandra projection.
+#
+# Please note that custom overrides can be defined here.
+#
+# elasticsearch.search.overrides=org.apache.james.mailbox.cassandra.search.AllSearchOverride,org.apache.james.mailbox.cassandra.search.DeletedSearchOverride, org.apache.james.mailbox.cassandra.search.DeletedWithRangeSearchOverride,org.apache.james.mailbox.cassandra.search.NotDeletedWithRangeSearchOverride,org.apache.james.mailbox.cassandra.search.UidSearchOverride,org.apache.james.mailbox.cassandra.search.UnseenSearchOverride
diff --git a/server/apps/distributed-app/sample-configuration/elasticsearch.properties b/server/apps/distributed-app/sample-configuration/elasticsearch.properties
index 16ea216d9b..871812b8ca 100644
--- a/server/apps/distributed-app/sample-configuration/elasticsearch.properties
+++ b/server/apps/distributed-app/sample-configuration/elasticsearch.properties
@@ -81,3 +81,24 @@ elasticsearch.http.port=9200
 elasticsearch.metrics.reports.enabled=true
 elasticsearch.metrics.reports.period=30
 elasticsearch.metrics.reports.index=james-metrics
+
+# Search overrides allow resolution of predefined search queries against alternative sources of data
+# and allow bypassing ElasticSearch. This is useful to handle most resynchronisation queries that
+# are simple enough to be resolved against Cassandra.
+#
+# Possible values are:
+#  - `org.apache.james.mailbox.cassandra.search.AllSearchOverride` Some IMAP clients uses SEARCH ALL to fully list messages in
+# a mailbox and detect deletions. This is typically done by clients not supporting QRESYNC and from am IMAP perspective
+# is considered an optimisation as less data is transmitted compared to a FETCH command. Resolving such requests against
+# Cassandra is enabled by this search override and likely desirable.
+#  - `org.apache.james.mailbox.cassandra.search.UidSearchOverride`. Same as above but restricted by ranges.
+#  - `org.apache.james.mailbox.cassandra.search.DeletedSearchOverride`. Find deleted messages by looking up in the relevant Cassandra
+# table.
+#  - `org.apache.james.mailbox.cassandra.search.DeletedWithRangeSearchOverride`. Same as above but limited by ranges.
+#  - `org.apache.james.mailbox.cassandra.search.NotDeletedWithRangeSearchOverride`. List non deleted messages in a given range.
+# Lists all messages and filters out deleted message thus this is based on the following heuristic: most messages are not marked as deleted.
+#  - `org.apache.james.mailbox.cassandra.search.UnseenSearchOverride`. List unseen messages in the corresponding cassandra projection.
+#
+# Please note that custom overrides can be defined here.
+#
+# elasticsearch.search.overrides=org.apache.james.mailbox.cassandra.search.AllSearchOverride,org.apache.james.mailbox.cassandra.search.DeletedSearchOverride, org.apache.james.mailbox.cassandra.search.DeletedWithRangeSearchOverride,org.apache.james.mailbox.cassandra.search.NotDeletedWithRangeSearchOverride,org.apache.james.mailbox.cassandra.search.UidSearchOverride,org.apache.james.mailbox.cassandra.search.UnseenSearchOverride


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org