From 3592af0b79faa67a38c40e790f558a0f0e476551 Mon Sep 17 00:00:00 2001 From: Jan Date: Wed, 21 Aug 2019 18:08:15 +0200 Subject: [PATCH] Bug fix 3.5/mark fulltext near etc as cacheable (#9772) * mark AQL functions FULLTEXT, NEAR, WITHIN, WITHIN_RECTANGLE as cacheable * updated CHANGELOG --- CHANGELOG | 4 ++++ arangod/Aql/AqlFunctionFeature.cpp | 15 +++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 7f446c65b6..cdc31e08ab 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,10 @@ v3.5.1 (XXXX-XX-XX) ------------------- +* The AQL functions `FULLTEXT`, `NEAR`, `WITHIN` and `WITHIN_RECTANGLE` are now + marked as cacheable, so they can be used in conjunction with the AQL query + results cache on a single server. + * Fixed issue #9612: fix ArangoSearch views getting out of sync with collection. * Fix an issue with potential spurious wakeups in the internal scheduler code. diff --git a/arangod/Aql/AqlFunctionFeature.cpp b/arangod/Aql/AqlFunctionFeature.cpp index 3dddbeada1..9bf90429b1 100644 --- a/arangod/Aql/AqlFunctionFeature.cpp +++ b/arangod/Aql/AqlFunctionFeature.cpp @@ -443,14 +443,13 @@ void AqlFunctionFeature::addMiscFunctions() { add({"WARN", ".,.", Function::makeFlags(FF::CanRunOnDBServer), &Functions::Warn}); // not deterministic and not cacheable // NEAR, WITHIN, WITHIN_RECTANGLE and FULLTEXT are replaced by the AQL - // optimizer with collection-based subqueries they are all not marked as - // non-deterministic and non-cacheable here as they refer to documents - // note further that all of these function call will be replaced by equivalent - // subqueries by the optimizer - add({"NEAR", ".h,.,.|.,.", Function::makeFlags(), &Functions::NotImplemented}); - add({"WITHIN", ".h,.,.,.|.", Function::makeFlags(), &Functions::NotImplemented}); - add({"WITHIN_RECTANGLE", "h.,.,.,.,.", Function::makeFlags(), &Functions::NotImplemented}); - add({"FULLTEXT", ".h,.,.|.", Function::makeFlags(), &Functions::NotImplemented}); + // optimizer with collection-/index-based subqueries. they are all + // marked as deterministic and cacheable here as they are just + // placeholders for collection/index accesses nowaways. + add({"NEAR", ".h,.,.|.,.", Function::makeFlags(FF::Cacheable), &Functions::NotImplemented}); + add({"WITHIN", ".h,.,.,.|.", Function::makeFlags(FF::Cacheable), &Functions::NotImplemented}); + add({"WITHIN_RECTANGLE", "h.,.,.,.,.", Function::makeFlags(FF::Cacheable), &Functions::NotImplemented}); + add({"FULLTEXT", ".h,.,.|.", Function::makeFlags(FF::Cacheable), &Functions::NotImplemented}); } } // namespace aql