You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by se...@apache.org on 2022/01/19 17:22:14 UTC
[incubator-ponymail-foal] branch master updated (5dbcded -> 97139b6)
This is an automated email from the ASF dual-hosted git repository.
sebb pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git.
from 5dbcded Not used in Foal
new 48dfe52 match does not work against keyword fields
new 97139b6 Update version
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
server/plugins/messages.py | 10 ++++------
server/server_version.py | 2 +-
2 files changed, 5 insertions(+), 7 deletions(-)
[incubator-ponymail-foal] 01/02: match does not work against keyword fields
Posted by se...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
commit 48dfe5280b721338a463a06f27539913955559ff
Author: Sebb <se...@apache.org>
AuthorDate: Wed Jan 19 17:21:23 2022 +0000
match does not work against keyword fields
This fixes #210
---
server/plugins/messages.py | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/server/plugins/messages.py b/server/plugins/messages.py
index d232cf0..cd1e49f 100644
--- a/server/plugins/messages.py
+++ b/server/plugins/messages.py
@@ -219,13 +219,11 @@ async def get_email(
listid: str = None,
) -> typing.Optional[dict]:
"""
- Returns a matching mbox document or None
+ Returns a single matching mbox document or None
The calling code is responsible for checking if the entry is accessible
"""
assert session.database, DATABASE_NOT_CONNECTED
doctype = session.database.dbs.db_mbox
- # Older indexes may need a match instead of a strict terms agg in order to find
- # emails in DBs that may have been incorrectly analyzed.
doc = None
if permalink:
try:
@@ -237,7 +235,7 @@ async def get_email(
permalink += ".+"
aggtype = "regexp"
else:
- aggtype = "match"
+ aggtype = "term"
res = await session.database.search(
index=doctype,
size=1,
@@ -248,9 +246,9 @@ async def get_email(
if len(res["hits"]["hits"]) == 1:
doc = res["hits"]["hits"][0]
elif messageid:
- bquery = {"query": {"bool": {"must": [{"match": {"message-id": messageid}}]}}}
+ bquery = {"query": {"bool": {"must": [{"term": {"message-id": messageid}}]}}}
if listid: # Specific List ID required?
- bquery = {"query": {"bool": {"must": [{"match": {"message-id": messageid}}, {"term": {"list_raw": listid}}]}}}
+ bquery = {"query": {"bool": {"must": [{"term": {"message-id": messageid}}, {"term": {"list_raw": listid}}]}}}
res = await session.database.search(
index=doctype,
size=1,
[incubator-ponymail-foal] 02/02: Update version
Posted by se...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
commit 97139b67cf958ec8849ad33e657e690b5201398c
Author: Sebb <se...@apache.org>
AuthorDate: Wed Jan 19 17:22:00 2022 +0000
Update version
---
server/server_version.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/server_version.py b/server/server_version.py
index 71ed971..cf33ec2 100644
--- a/server/server_version.py
+++ b/server/server_version.py
@@ -1,2 +1,2 @@
# This file is generated by server/update_version.sh
-PONYMAIL_SERVER_VERSION = 'c899de9'
+PONYMAIL_SERVER_VERSION = '48dfe52'