summaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests/proton/matching/querynodes_test.cpp
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2021-03-28 22:07:37 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2021-03-29 13:56:56 +0000
commitd4712740d1281fa3a2fa945dfd3ea4c2182d663c (patch)
tree1ace22ed894ed094bbb5c1725899124e325781f0 /searchcore/src/tests/proton/matching/querynodes_test.cpp
parentfef814ec263ce1ceca0416251b3204f43ee3ed30 (diff)
- Let DotProduct,Wand and WeightedSet be Term nodes in the query tree as they really are.
That restricts the nodes to what they can really do and makes them significantly cheaper. - In addition type conversion of numeric terms is delayed to when it is necessary. And as next step they can be avoided completely.
Diffstat (limited to 'searchcore/src/tests/proton/matching/querynodes_test.cpp')
-rw-r--r--searchcore/src/tests/proton/matching/querynodes_test.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/searchcore/src/tests/proton/matching/querynodes_test.cpp b/searchcore/src/tests/proton/matching/querynodes_test.cpp
index 07f4e53bf6d..7795d1563d2 100644
--- a/searchcore/src/tests/proton/matching/querynodes_test.cpp
+++ b/searchcore/src/tests/proton/matching/querynodes_test.cpp
@@ -518,6 +518,13 @@ TEST("requireThatSimpleIntermediatesGetProperBlending") {
TEST_DO(checkProperBlendingWithParent<Rank>());
}
+TEST("control query nodes size") {
+ EXPECT_EQUAL(160u, sizeof(search::query::NumberTerm));
+ EXPECT_EQUAL(192u, sizeof(ProtonNodeTypes::NumberTerm));
+ EXPECT_EQUAL(160u, sizeof(search::query::StringTerm));
+ EXPECT_EQUAL(192u, sizeof(ProtonNodeTypes::StringTerm));
+}
+
} // namespace
TEST_MAIN() { TEST_RUN_ALL(); }