diff --git a/arangod/VocBase/document-collection.cpp b/arangod/VocBase/document-collection.cpp index a9b88f8eed..693f4441b0 100644 --- a/arangod/VocBase/document-collection.cpp +++ b/arangod/VocBase/document-collection.cpp @@ -2662,6 +2662,18 @@ size_t TRI_DocumentIteratorDocumentCollection (triagens::arango::Transaction* tr return nrUsed; } +//////////////////////////////////////////////////////////////////////////////// +/// @brief create an index, based on a VelocyPack description +//////////////////////////////////////////////////////////////////////////////// + +int TRI_FromVelocyPackIndexDocumentCollection (triagens::arango::Transaction* trx, + TRI_document_collection_t* document, + VPackSlice const& slice, + triagens::arango::Index** idx) { + std::unique_ptr json(triagens::basics::VelocyPackHelper::velocyPackToJson(slice)); + return TRI_FromJsonIndexDocumentCollection(trx, document, json.get(), idx); +} + //////////////////////////////////////////////////////////////////////////////// /// @brief create an index, based on a JSON description //////////////////////////////////////////////////////////////////////////////// diff --git a/arangod/VocBase/document-collection.h b/arangod/VocBase/document-collection.h index f0178cdfb6..8e1c51a7de 100644 --- a/arangod/VocBase/document-collection.h +++ b/arangod/VocBase/document-collection.h @@ -790,6 +790,15 @@ void TRI_UpdateRevisionDocumentCollection (TRI_document_collection_t*, bool TRI_IsFullyCollectedDocumentCollection (TRI_document_collection_t*); +//////////////////////////////////////////////////////////////////////////////// +/// @brief create an index, based on a VelocyPack description +//////////////////////////////////////////////////////////////////////////////// + +int TRI_FromVelocyPackIndexDocumentCollection (triagens::arango::Transaction*, + TRI_document_collection_t*, + VPackSlice const&, + triagens::arango::Index**); + //////////////////////////////////////////////////////////////////////////////// /// @brief create an index, based on a JSON description ////////////////////////////////////////////////////////////////////////////////