The branch, v4-22-test has been updated
via 5e797f8907a mdssvc: add support for parsing date ranges
via 954b08d1b3d mdssvc: add a test for parsing Spotlight date ranges
via a22f2a91b28 mdssvc: reduce a log level to DEBUG
from c78caf6c40e ctdb-scripts: Avoid failing updateip when IP is not
assigned
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-22-test
- Log -----------------------------------------------------------------
commit 5e797f8907ad722e84eea5d1038c01556054c251
Author: Ralph Boehme <[email protected]>
Date: Wed Oct 15 15:01:16 2025 +0200
mdssvc: add support for parsing date ranges
Example:
InRange(kMDItemContentCreationDate,$time.iso(2024-12-31T23:00:00Z),$time.iso(2025-12-31T23:00:00Z))
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15930
Signed-off-by: Ralph Boehme <[email protected]>
Reviewed-by: Volker Lendecke <[email protected]>
Autobuild-User(master): Ralph Böhme <[email protected]>
Autobuild-Date(master): Mon Oct 20 10:59:03 UTC 2025 on atb-devel-224
(cherry picked from commit c00de32585bf47ec4753f966fe9ac4dd2fb8f4e7)
Autobuild-User(v4-22-test): Jule Anger <[email protected]>
Autobuild-Date(v4-22-test): Mon Nov 3 13:59:46 UTC 2025 on atb-devel-224
commit 954b08d1b3d8d6451b7e309fcc82732f6f224c47
Author: Ralph Boehme <[email protected]>
Date: Fri Oct 17 12:38:53 2025 +0200
mdssvc: add a test for parsing Spotlight date ranges
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15930
Signed-off-by: Ralph Boehme <[email protected]>
Reviewed-by: Volker Lendecke <[email protected]>
(cherry picked from commit 1239e5a4c7f5930a4a1b3a6a7a005f4d543a5ea5)
commit a22f2a91b28be73936db1cc299a7924588334d63
Author: Ralph Boehme <[email protected]>
Date: Wed Oct 15 14:56:51 2025 +0200
mdssvc: reduce a log level to DEBUG
The expression
InRange(*,$time.iso(2024-12-31T23:00:00Z),$time.iso(2025-12-31T23:00:00Z))
in a Spotlight query produces the following log message:
map_fts: Mapping fts [757378800] unexpected op [~]
However, when
elasticsearch:ignore unknown attribute = yes
is set, the parser will ignore the failed expression and continue
parsing given the expression is part of a larger expression like
"subexpression1 OR subexpression2". Avoid spamming the log and reduce
the loglevel when we hit this case.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15930
Signed-off-by: Ralph Boehme <[email protected]>
Reviewed-by: Volker Lendecke <[email protected]>
(cherry picked from commit 3b2b50983901ad5039124b82f149b30675c80a9a)
-----------------------------------------------------------------------
Summary of changes:
source3/rpc_server/mdssvc/es_parser.y | 9 ++++++++-
source3/rpc_server/mdssvc/test_mdsparser_es.c | 3 +++
2 files changed, 11 insertions(+), 1 deletion(-)
Changeset truncated at 500 lines:
diff --git a/source3/rpc_server/mdssvc/es_parser.y
b/source3/rpc_server/mdssvc/es_parser.y
index 62ca63d90f2..1f1c02ba1a5 100644
--- a/source3/rpc_server/mdssvc/es_parser.y
+++ b/source3/rpc_server/mdssvc/es_parser.y
@@ -219,6 +219,13 @@ FUNC_INRANGE OBRACE attribute COMMA WORD COMMA WORD CBRACE
{
} else {
$$ = map_expr($3, '~', $5, $7);
}
+}
+| FUNC_INRANGE OBRACE attribute COMMA isodate COMMA isodate CBRACE {
+ if ($3 == NULL) {
+ $$ = NULL;
+ } else {
+ $$ = map_expr($3, '~', $5, $7);
+ }
};
attribute:
@@ -412,7 +419,7 @@ static char *map_fts(const struct es_attr_map *attr,
end = ")";
break;
default:
- DBG_ERR("Mapping fts [%s] unexpected op [%c]\n", val, op);
+ DBG_DEBUG("Mapping fts [%s] unexpected op [%c]\n", val, op);
return NULL;
}
diff --git a/source3/rpc_server/mdssvc/test_mdsparser_es.c
b/source3/rpc_server/mdssvc/test_mdsparser_es.c
index a61f84ceaff..5015de82127 100644
--- a/source3/rpc_server/mdssvc/test_mdsparser_es.c
+++ b/source3/rpc_server/mdssvc/test_mdsparser_es.c
@@ -155,6 +155,9 @@ static struct {
}, {
"InRange(kMDItemFSSize,1,2)",
"file.filesize:[1 TO 2]"
+ }, {
+
"InRange(kMDItemContentCreationDate,$time.iso(2024-12-31T23:00:00Z),$time.iso(2025-12-31T23:00:00Z))",
+ "file.created:[2024\\\\-12\\\\-31T23\\\\:00\\\\:00Z TO
2025\\\\-12\\\\-31T23\\\\:00\\\\:00Z]"
}
};
--
Samba Shared Repository