From d7bbd1e9e27a1ee0447e2403ea4ba2b5bef5a43c Mon Sep 17 00:00:00 2001 From: Michael Hackstein Date: Fri, 30 Oct 2015 09:25:21 +0100 Subject: [PATCH] Removed temporary allowPartialIndex from IndexInformation. This is an internal variable and should never bother the user --- arangod/Indexes/HashIndex.cpp | 5 ++--- arangod/Indexes/PathBasedIndex.cpp | 4 ++-- arangod/Indexes/PathBasedIndex.h | 2 +- arangod/Indexes/SkiplistIndex.cpp | 5 ++--- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/arangod/Indexes/HashIndex.cpp b/arangod/Indexes/HashIndex.cpp index 450e83a22c..ad5bbd5bd7 100644 --- a/arangod/Indexes/HashIndex.cpp +++ b/arangod/Indexes/HashIndex.cpp @@ -331,7 +331,7 @@ HashIndex::HashIndex (TRI_idx_iid_t iid, //////////////////////////////////////////////////////////////////////////////// HashIndex::HashIndex (TRI_json_t const* json) - : PathBasedIndex(json), + : PathBasedIndex(json, false), _uniqueArray(nullptr) { } @@ -395,8 +395,7 @@ triagens::basics::Json HashIndex::toJson (TRI_memory_zone_t* zone, auto json = Index::toJson(zone, withFigures); json("unique", triagens::basics::Json(zone, _unique)) - ("sparse", triagens::basics::Json(zone, _sparse)) - ("allowPartialIndex", triagens::basics::Json(zone, _allowPartialIndex)); + ("sparse", triagens::basics::Json(zone, _sparse)); return json; } diff --git a/arangod/Indexes/PathBasedIndex.cpp b/arangod/Indexes/PathBasedIndex.cpp index f0f61deff6..2eecd25a6e 100644 --- a/arangod/Indexes/PathBasedIndex.cpp +++ b/arangod/Indexes/PathBasedIndex.cpp @@ -93,12 +93,12 @@ PathBasedIndex::PathBasedIndex (TRI_idx_iid_t iid, /// this is used in the cluster coordinator case //////////////////////////////////////////////////////////////////////////////// -PathBasedIndex::PathBasedIndex (TRI_json_t const* json) +PathBasedIndex::PathBasedIndex (TRI_json_t const* json, bool allowPartialIndex) : Index(json), _shaper(nullptr), _paths(), _useExpansion(false), - _allowPartialIndex(triagens::basics::JsonHelper::getBooleanValue(json, "allowPartialIndex", false)) { + _allowPartialIndex(allowPartialIndex) { TRI_ASSERT(! _fields.empty()); diff --git a/arangod/Indexes/PathBasedIndex.h b/arangod/Indexes/PathBasedIndex.h index 5478730314..1f090b9f35 100644 --- a/arangod/Indexes/PathBasedIndex.h +++ b/arangod/Indexes/PathBasedIndex.h @@ -93,7 +93,7 @@ namespace triagens { bool sparse, bool allowPartialIndex); - explicit PathBasedIndex (struct TRI_json_t const*); + explicit PathBasedIndex (struct TRI_json_t const*, bool); ~PathBasedIndex (); diff --git a/arangod/Indexes/SkiplistIndex.cpp b/arangod/Indexes/SkiplistIndex.cpp index d0b5e3d161..b3122461d0 100644 --- a/arangod/Indexes/SkiplistIndex.cpp +++ b/arangod/Indexes/SkiplistIndex.cpp @@ -805,7 +805,7 @@ SkiplistIndex::SkiplistIndex (TRI_idx_iid_t iid, //////////////////////////////////////////////////////////////////////////////// SkiplistIndex::SkiplistIndex (TRI_json_t const* json) - : PathBasedIndex(json), + : PathBasedIndex(json, true), CmpElmElm(this), CmpKeyElm(this), _skiplistIndex(nullptr) { @@ -838,8 +838,7 @@ triagens::basics::Json SkiplistIndex::toJson (TRI_memory_zone_t* zone, auto json = Index::toJson(zone, withFigures); json("unique", triagens::basics::Json(zone, _unique)) - ("sparse", triagens::basics::Json(zone, _sparse)) - ("allowPartialIndex", triagens::basics::Json(zone, _allowPartialIndex)); + ("sparse", triagens::basics::Json(zone, _sparse)); return json; }