mirror of https://gitee.com/bigwinds/arangodb
reformat arangosearch sources (#7941)
This commit is contained in:
parent
0fcf2c5784
commit
360b9f456c
|
@ -155,9 +155,7 @@ bool equalTo(aql::AstNode const* lhs, aql::AstNode const* rhs) {
|
|||
return lhs->value.value._int == rhs->value.value._int;
|
||||
}
|
||||
|
||||
default: {
|
||||
return false;
|
||||
}
|
||||
default: { return false; }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -169,11 +167,7 @@ size_t hash(aql::AstNode const* node, size_t hash /*= 0*/) noexcept {
|
|||
// hash node type
|
||||
auto const& typeString = node->getTypeString();
|
||||
|
||||
hash = fasthash64(
|
||||
static_cast<const void*>(typeString.c_str()),
|
||||
typeString.size(),
|
||||
hash
|
||||
);
|
||||
hash = fasthash64(static_cast<const void*>(typeString.c_str()), typeString.size(), hash);
|
||||
|
||||
// hash node members
|
||||
for (size_t i = 0, n = node->numMembers(); i < n; ++i) {
|
||||
|
@ -302,9 +296,8 @@ irs::string_ref getFuncName(aql::AstNode const& node) {
|
|||
return fname;
|
||||
}
|
||||
|
||||
void visitReferencedVariables(
|
||||
aql::AstNode const& root,
|
||||
std::function<void(aql::Variable const&)> const& visitor) {
|
||||
void visitReferencedVariables(aql::AstNode const& root,
|
||||
std::function<void(aql::Variable const&)> const& visitor) {
|
||||
auto preVisitor = [](aql::AstNode const* node) -> bool {
|
||||
return !node->isConstant();
|
||||
};
|
||||
|
|
|
@ -145,9 +145,8 @@ bool visit(aql::SortCondition const& sort, Visitor const& visitor) {
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief visits variables referenced in a specified expression
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void visitReferencedVariables(
|
||||
aql::AstNode const& root,
|
||||
std::function<void(aql::Variable const&)> const& visitor);
|
||||
void visitReferencedVariables(aql::AstNode const& root,
|
||||
std::function<void(aql::Variable const&)> const& visitor);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief visits the specified node using the provided 'visitor' according
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
|
||||
#include "Containers.h"
|
||||
|
||||
NS_BEGIN(arangodb)
|
||||
NS_BEGIN(iresearch)
|
||||
namespace arangodb {
|
||||
namespace iresearch {
|
||||
|
||||
void ResourceMutex::reset() {
|
||||
if (get()) {
|
||||
|
@ -36,9 +36,9 @@ void ResourceMutex::reset() {
|
|||
}
|
||||
}
|
||||
|
||||
NS_END // iresearch
|
||||
NS_END // arangodb
|
||||
} // namespace iresearch
|
||||
} // namespace arangodb
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- END-OF-FILE
|
||||
// -----------------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- END-OF-FILE
|
||||
// -----------------------------------------------------------------------------
|
||||
|
|
|
@ -35,15 +35,15 @@
|
|||
#include "utils/memory.hpp"
|
||||
#include "utils/string.hpp"
|
||||
|
||||
NS_LOCAL
|
||||
namespace {
|
||||
|
||||
template <typename...>
|
||||
struct typelist;
|
||||
|
||||
NS_END
|
||||
}
|
||||
|
||||
NS_BEGIN(arangodb)
|
||||
NS_BEGIN(iresearch)
|
||||
namespace arangodb {
|
||||
namespace iresearch {
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief a read-mutex for a resource
|
||||
|
@ -369,7 +369,7 @@ class UnorderedRefKeyMap : public UnorderedRefKeyMapBase<CharType, V>,
|
|||
}
|
||||
};
|
||||
|
||||
NS_END // iresearch
|
||||
NS_END // arangodb
|
||||
} // namespace iresearch
|
||||
} // namespace arangodb
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -29,20 +29,20 @@
|
|||
|
||||
#include "search/filter.hpp"
|
||||
|
||||
NS_BEGIN(arangodb)
|
||||
namespace arangodb {
|
||||
|
||||
NS_BEGIN(aql)
|
||||
namespace aql {
|
||||
struct AstNode;
|
||||
class Ast;
|
||||
class ExecutionPlan;
|
||||
NS_END // aql
|
||||
} // namespace aql
|
||||
|
||||
NS_BEGIN(iresearch)
|
||||
namespace iresearch {
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// @struct ExpressionCompilationContext
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
struct ExpressionCompilationContext {
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// @struct ExpressionCompilationContext
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
struct ExpressionCompilationContext {
|
||||
bool operator==(ExpressionCompilationContext const& rhs) const noexcept {
|
||||
return plan == rhs.plan && ast == rhs.ast && node == rhs.node;
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ class ByExpression final : public irs::filter {
|
|||
ExpressionCompilationContext _ctx;
|
||||
}; // ByExpression
|
||||
|
||||
NS_END // iresearch
|
||||
NS_END // arangodb
|
||||
} // namespace iresearch
|
||||
} // namespace arangodb
|
||||
|
||||
#endif // ARANGODB_IRESEARCH__IRESEARCH_EXPRESSION_FILTER
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
#include "VocBase/ManagedDocumentResult.h"
|
||||
#include "VocBase/vocbase.h"
|
||||
|
||||
NS_LOCAL
|
||||
namespace {
|
||||
|
||||
static std::string const ANALYZER_COLLECTION_NAME("_iresearch_analyzers");
|
||||
static size_t const DEFAULT_POOL_SIZE = 8; // arbitrary value
|
||||
|
@ -277,10 +277,10 @@ arangodb::SystemDatabaseFeature::ptr getSystemDatabase() {
|
|||
typedef irs::async_utils::read_write_mutex::read_mutex ReadMutex;
|
||||
typedef irs::async_utils::read_write_mutex::write_mutex WriteMutex;
|
||||
|
||||
NS_END
|
||||
} // namespace
|
||||
|
||||
NS_BEGIN(arangodb)
|
||||
NS_BEGIN(iresearch)
|
||||
namespace arangodb {
|
||||
namespace iresearch {
|
||||
|
||||
/*static*/ IResearchAnalyzerFeature::AnalyzerPool::Builder::ptr
|
||||
IResearchAnalyzerFeature::AnalyzerPool::Builder::make(irs::string_ref const& type,
|
||||
|
@ -1347,9 +1347,9 @@ bool IResearchAnalyzerFeature::visit(
|
|||
return true;
|
||||
}
|
||||
|
||||
NS_END // iresearch
|
||||
NS_END // arangodb
|
||||
} // namespace iresearch
|
||||
} // namespace arangodb
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- END-OF-FILE
|
||||
// -----------------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- END-OF-FILE
|
||||
// -----------------------------------------------------------------------------
|
|
@ -33,25 +33,25 @@
|
|||
|
||||
#include "ApplicationFeatures/ApplicationFeature.h"
|
||||
|
||||
NS_BEGIN(arangodb)
|
||||
NS_BEGIN(transaction)
|
||||
namespace arangodb {
|
||||
namespace transaction {
|
||||
|
||||
class Methods; // forward declaration
|
||||
|
||||
NS_END // transaction
|
||||
NS_END // arangodb
|
||||
} // namespace transaction
|
||||
} // namespace arangodb
|
||||
|
||||
NS_BEGIN(arangodb) NS_BEGIN(iresearch)
|
||||
namespace arangodb {
|
||||
namespace iresearch {
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief a cache of IResearch analyzer instances
|
||||
/// and a provider of AQL TOKENS(<data>, <analyzer>) function
|
||||
/// NOTE: deallocation of an IResearchAnalyzerFeature instance
|
||||
/// invalidates all AnalyzerPool instances previously provided
|
||||
/// by the deallocated feature instance
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
class IResearchAnalyzerFeature final
|
||||
: public arangodb::application_features::ApplicationFeature {
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief a cache of IResearch analyzer instances
|
||||
/// and a provider of AQL TOKENS(<data>, <analyzer>) function
|
||||
/// NOTE: deallocation of an IResearchAnalyzerFeature instance
|
||||
/// invalidates all AnalyzerPool instances previously provided
|
||||
/// by the deallocated feature instance
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
class IResearchAnalyzerFeature final : public arangodb::application_features::ApplicationFeature {
|
||||
public:
|
||||
// thread-safe analyzer pool
|
||||
class AnalyzerPool : private irs::util::noncopyable {
|
||||
|
@ -127,7 +127,7 @@ NS_END // transaction
|
|||
bool storeConfiguration(AnalyzerPool& pool);
|
||||
};
|
||||
|
||||
NS_END // iresearch
|
||||
NS_END // arangodb
|
||||
} // namespace iresearch
|
||||
} // namespace arangodb
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,54 +0,0 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// DISCLAIMER
|
||||
///
|
||||
/// Copyright 2017 ArangoDB GmbH, Cologne, Germany
|
||||
///
|
||||
/// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
/// you may not use this file except in compliance with the License.
|
||||
/// You may obtain a copy of the License at
|
||||
///
|
||||
/// http://www.apache.org/licenses/LICENSE-2.0
|
||||
///
|
||||
/// Unless required by applicable law or agreed to in writing, software
|
||||
/// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
/// See the License for the specific language governing permissions and
|
||||
/// limitations under the License.
|
||||
///
|
||||
/// Copyright holder is ArangoDB GmbH, Cologne, Germany
|
||||
///
|
||||
/// @author Andrey Abramov
|
||||
/// @author Vasiliy Nabatchikov
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "IResearchAttributes.h"
|
||||
|
||||
NS_BEGIN(arangodb)
|
||||
NS_BEGIN(iresearch)
|
||||
NS_BEGIN(attribute)
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- AttributePath
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
REGISTER_ATTRIBUTE(AttributePath);
|
||||
DEFINE_ATTRIBUTE_TYPE(AttributePath);
|
||||
DEFINE_FACTORY_DEFAULT(AttributePath);
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- Transaction
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
REGISTER_ATTRIBUTE(Transaction);
|
||||
DEFINE_ATTRIBUTE_TYPE(Transaction);
|
||||
|
||||
Transaction::Transaction(arangodb::transaction::Methods& trx)
|
||||
: irs::basic_attribute<arangodb::transaction::Methods&>(trx) {}
|
||||
|
||||
NS_END // attribute
|
||||
NS_END // iresearch
|
||||
NS_END // arangodb
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- END-OF-FILE
|
||||
// -----------------------------------------------------------------------------
|
|
@ -1,61 +0,0 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// DISCLAIMER
|
||||
///
|
||||
/// Copyright 2017 ArangoDB GmbH, Cologne, Germany
|
||||
///
|
||||
/// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
/// you may not use this file except in compliance with the License.
|
||||
/// You may obtain a copy of the License at
|
||||
///
|
||||
/// http://www.apache.org/licenses/LICENSE-2.0
|
||||
///
|
||||
/// Unless required by applicable law or agreed to in writing, software
|
||||
/// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
/// See the License for the specific language governing permissions and
|
||||
/// limitations under the License.
|
||||
///
|
||||
/// Copyright holder is ArangoDB GmbH, Cologne, Germany
|
||||
///
|
||||
/// @author Andrey Abramov
|
||||
/// @author Vasiliy Nabatchikov
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef ARANGOD_IRESEARCH__IRESEARCH_ATTRIBUTES_H
|
||||
#define ARANGOD_IRESEARCH__IRESEARCH_ATTRIBUTES_H 1
|
||||
|
||||
#include "utils/attributes.hpp"
|
||||
#include "velocypack/Builder.h"
|
||||
|
||||
NS_BEGIN(arangodb)
|
||||
NS_BEGIN(transaction)
|
||||
|
||||
class Methods; // forward declaration
|
||||
|
||||
NS_END // transaction
|
||||
NS_END // arangodb
|
||||
|
||||
NS_BEGIN(arangodb) NS_BEGIN(iresearch) NS_BEGIN(attribute)
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief contains the path to the attribute encoded as a jSON array
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
struct AttributePath : irs::basic_stored_attribute<arangodb::velocypack::Builder> {
|
||||
DECLARE_ATTRIBUTE_TYPE();
|
||||
DECLARE_FACTORY();
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief contains a pointer to the current transaction
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
struct Transaction : irs::basic_attribute<arangodb::transaction::Methods&> {
|
||||
DECLARE_ATTRIBUTE_TYPE();
|
||||
|
||||
explicit Transaction(arangodb::transaction::Methods& trx);
|
||||
};
|
||||
|
||||
NS_END // attribute
|
||||
NS_END // iresearch
|
||||
NS_END // arangodb
|
||||
|
||||
#endif
|
|
@ -41,7 +41,7 @@
|
|||
|
||||
#include "utils/log.hpp"
|
||||
|
||||
NS_LOCAL
|
||||
namespace {
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// --SECTION-- Primary key endianness
|
||||
|
@ -281,10 +281,10 @@ inline Filter getFilter(VPackSlice value,
|
|||
return valueAcceptors[4 * value.isArray() + 2 * meta._trackListPositions + meta._includeAllFields];
|
||||
}
|
||||
|
||||
NS_END
|
||||
} // namespace
|
||||
|
||||
NS_BEGIN(arangodb)
|
||||
NS_BEGIN(iresearch)
|
||||
namespace arangodb {
|
||||
namespace iresearch {
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// --SECTION-- Field implementation
|
||||
|
@ -637,9 +637,9 @@ void FieldIterator::next() {
|
|||
return true;
|
||||
}
|
||||
|
||||
NS_END // iresearch
|
||||
NS_END // arangodb
|
||||
} // namespace iresearch
|
||||
} // namespace arangodb
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- END-OF-FILE
|
||||
// -----------------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- END-OF-FILE
|
||||
// -----------------------------------------------------------------------------
|
||||
|
|
|
@ -33,37 +33,40 @@
|
|||
#include "search/filter.hpp"
|
||||
#include "store/data_output.hpp"
|
||||
|
||||
NS_BEGIN(iresearch)
|
||||
namespace iresearch {
|
||||
|
||||
class boolean_filter; // forward declaration
|
||||
struct data_output; // forward declaration
|
||||
class token_stream; // forward declaration
|
||||
|
||||
NS_END // iresearch
|
||||
} // namespace iresearch
|
||||
|
||||
NS_BEGIN(arangodb) NS_BEGIN(aql)
|
||||
namespace arangodb {
|
||||
namespace aql {
|
||||
|
||||
struct AstNode; // forward declaration
|
||||
class SortCondition; // forward declaration
|
||||
struct AstNode; // forward declaration
|
||||
class SortCondition; // forward declaration
|
||||
|
||||
NS_END // aql
|
||||
NS_END // arangodb
|
||||
} // namespace aql
|
||||
} // namespace arangodb
|
||||
|
||||
NS_BEGIN(arangodb) NS_BEGIN(transaction)
|
||||
namespace arangodb {
|
||||
namespace transaction {
|
||||
|
||||
class Methods; // forward declaration
|
||||
class Methods; // forward declaration
|
||||
|
||||
NS_END // transaction
|
||||
NS_END // arangodb
|
||||
} // namespace transaction
|
||||
} // namespace arangodb
|
||||
|
||||
NS_BEGIN(arangodb) NS_BEGIN(iresearch)
|
||||
namespace arangodb {
|
||||
namespace iresearch {
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief the delimiter used to separate jSON nesting levels when
|
||||
/// generating
|
||||
/// flat iResearch field names
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
constexpr char const NESTING_LEVEL_DELIMITER = '.';
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief the delimiter used to separate jSON nesting levels when
|
||||
/// generating
|
||||
/// flat iResearch field names
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
constexpr char const NESTING_LEVEL_DELIMITER = '.';
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief the prefix used to denote start of jSON list offset when generating
|
||||
|
@ -235,7 +238,7 @@ struct DocumentPrimaryKey {
|
|||
DocumentPrimaryKey() = delete;
|
||||
}; // DocumentPrimaryKey
|
||||
|
||||
NS_END // iresearch
|
||||
NS_END // arangodb
|
||||
} // namespace iresearch
|
||||
} // namespace arangodb
|
||||
|
||||
#endif
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
|
||||
#include "IResearch/IResearchExpressionContext.h"
|
||||
#include "Aql/AqlItemBlock.h"
|
||||
#include "IResearch/IResearchViewNode.h"
|
||||
#include "Basics/StaticStrings.h"
|
||||
#include "IResearch/IResearchViewNode.h"
|
||||
|
||||
namespace arangodb {
|
||||
namespace iresearch {
|
||||
|
@ -81,10 +81,9 @@ AqlValue ViewExpressionContext::getVariableValue(Variable const* var, bool doCop
|
|||
auto const& varInfo = it->second;
|
||||
|
||||
if (varInfo.depth > decltype(varInfo.depth)(_node->getDepth())) {
|
||||
THROW_ARANGO_EXCEPTION_FORMAT(
|
||||
TRI_ERROR_BAD_PARAMETER,
|
||||
"Variable '%s' is used before being assigned",
|
||||
var->name.c_str());
|
||||
THROW_ARANGO_EXCEPTION_FORMAT(TRI_ERROR_BAD_PARAMETER,
|
||||
"Variable '%s' is used before being assigned",
|
||||
var->name.c_str());
|
||||
}
|
||||
|
||||
auto& value = _data->getValueReference(_pos, varInfo.registerId);
|
||||
|
|
|
@ -61,20 +61,22 @@
|
|||
#include "Transaction/Methods.h"
|
||||
#include "VocBase/LogicalView.h"
|
||||
|
||||
NS_BEGIN(arangodb)
|
||||
namespace arangodb {
|
||||
|
||||
namespace basics {
|
||||
|
||||
NS_BEGIN(basics)
|
||||
class VPackStringBufferAdapter;
|
||||
NS_END // basics
|
||||
} // namespace basics
|
||||
|
||||
NS_BEGIN(aql) class Query;
|
||||
NS_END // aql
|
||||
namespace aql {
|
||||
class Query;
|
||||
} // namespace aql
|
||||
|
||||
NS_END // arangodb
|
||||
} // namespace arangodb
|
||||
|
||||
NS_LOCAL
|
||||
namespace {
|
||||
|
||||
typedef irs::async_utils::read_write_mutex::read_mutex ReadMutex;
|
||||
typedef irs::async_utils::read_write_mutex::read_mutex ReadMutex;
|
||||
typedef irs::async_utils::read_write_mutex::write_mutex WriteMutex;
|
||||
|
||||
class IResearchLogTopic final : public arangodb::LogTopic {
|
||||
|
@ -539,10 +541,10 @@ void registerTransactionDataSourceRegistrationCallback() {
|
|||
std::string const FEATURE_NAME("ArangoSearch");
|
||||
IResearchLogTopic LIBIRESEARCH("libiresearch");
|
||||
|
||||
NS_END
|
||||
} // namespace
|
||||
|
||||
NS_BEGIN(arangodb)
|
||||
NS_BEGIN(iresearch)
|
||||
namespace arangodb {
|
||||
namespace iresearch {
|
||||
|
||||
bool isFilter(arangodb::aql::Function const& func) noexcept {
|
||||
return func.implementation == &dummyFilterFunc;
|
||||
|
@ -976,8 +978,8 @@ void IResearchFeature::validateOptions(std::shared_ptr<arangodb::options::Progra
|
|||
ApplicationFeature::validateOptions(options);
|
||||
}
|
||||
|
||||
NS_END // iresearch
|
||||
NS_END // arangodb
|
||||
} // namespace iresearch
|
||||
} // namespace arangodb
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- END-OF-FILE
|
||||
|
|
|
@ -28,21 +28,22 @@
|
|||
|
||||
#include "search/filter.hpp"
|
||||
|
||||
NS_BEGIN(iresearch)
|
||||
namespace iresearch {
|
||||
|
||||
class boolean_filter; // forward declaration
|
||||
|
||||
NS_END // iresearch
|
||||
} // namespace iresearch
|
||||
|
||||
NS_BEGIN(arangodb) NS_BEGIN(aql)
|
||||
namespace arangodb {
|
||||
namespace aql {
|
||||
|
||||
struct AstNode; // forward declaration
|
||||
struct AstNode; // forward declaration
|
||||
|
||||
NS_END // aql
|
||||
} // namespace aql
|
||||
|
||||
NS_BEGIN(iresearch)
|
||||
namespace iresearch {
|
||||
|
||||
struct QueryContext;
|
||||
struct QueryContext;
|
||||
|
||||
struct FilterFactory {
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -53,7 +54,7 @@ struct FilterFactory {
|
|||
arangodb::aql::AstNode const& node);
|
||||
}; // FilterFactory
|
||||
|
||||
NS_END // iresearch
|
||||
NS_END // arangodb
|
||||
} // namespace iresearch
|
||||
} // namespace arangodb
|
||||
|
||||
#endif // ARANGOD_IRESEARCH__IRESEARCH_FILTER_FACTORY_H
|
||||
|
|
|
@ -25,9 +25,9 @@
|
|||
|
||||
#include "Basics/Common.h"
|
||||
|
||||
NS_BEGIN(arangodb)
|
||||
NS_BEGIN(iresearch)
|
||||
NS_BEGIN(kludge)
|
||||
namespace arangodb {
|
||||
namespace iresearch {
|
||||
namespace kludge {
|
||||
|
||||
const char TYPE_DELIMITER = '\0';
|
||||
const char ANALYZER_DELIMITER = '\1';
|
||||
|
@ -65,10 +65,10 @@ void demangleStringField(std::string& name, AnalyzerPool const& pool) {
|
|||
name.resize(name.size() - suffixSize);
|
||||
}
|
||||
|
||||
NS_END // kludge
|
||||
NS_END // iresearch
|
||||
NS_END // arangodb
|
||||
} // namespace kludge
|
||||
} // namespace iresearch
|
||||
} // namespace arangodb
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- END-OF-FILE
|
||||
// -----------------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- END-OF-FILE
|
||||
// -----------------------------------------------------------------------------
|
||||
|
|
|
@ -33,9 +33,9 @@
|
|||
|
||||
#include "IResearchLinkMeta.h"
|
||||
|
||||
NS_BEGIN(arangodb)
|
||||
NS_BEGIN(iresearch)
|
||||
NS_BEGIN(kludge)
|
||||
namespace arangodb {
|
||||
namespace iresearch {
|
||||
namespace kludge {
|
||||
|
||||
typedef arangodb::iresearch::IResearchAnalyzerFeature::AnalyzerPool AnalyzerPool;
|
||||
|
||||
|
@ -49,8 +49,8 @@ void mangleNumeric(std::string& name);
|
|||
void mangleStringField(std::string& name, AnalyzerPool const& pool);
|
||||
void demangleStringField(std::string& name, AnalyzerPool const& pool);
|
||||
|
||||
NS_END // kludge
|
||||
NS_END // iresearch
|
||||
NS_END // arangodb
|
||||
} // namespace kludge
|
||||
} // namespace iresearch
|
||||
} // namespace arangodb
|
||||
|
||||
#endif
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
|
||||
#include "IResearchLink.h"
|
||||
|
||||
NS_LOCAL
|
||||
namespace {
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief the storage format used with IResearch writers
|
||||
|
@ -204,10 +204,10 @@ inline arangodb::Result insertDocument(irs::index_writer::documents_context& ctx
|
|||
return arangodb::Result();
|
||||
}
|
||||
|
||||
NS_END
|
||||
} // namespace
|
||||
|
||||
NS_BEGIN(arangodb)
|
||||
NS_BEGIN(iresearch)
|
||||
namespace arangodb {
|
||||
namespace iresearch {
|
||||
|
||||
IResearchLink::IResearchLink(TRI_idx_iid_t iid,
|
||||
arangodb::LogicalCollection& collection)
|
||||
|
@ -1327,9 +1327,9 @@ std::shared_ptr<IResearchView> IResearchLink::view() const {
|
|||
: _collection.vocbase().lookupView(_viewGuid));
|
||||
}
|
||||
|
||||
NS_END // iresearch
|
||||
NS_END // arangodb
|
||||
} // namespace iresearch
|
||||
} // namespace arangodb
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- END-OF-FILE
|
||||
// -----------------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- END-OF-FILE
|
||||
// -----------------------------------------------------------------------------
|
||||
|
|
|
@ -34,8 +34,8 @@
|
|||
#include "Indexes/Index.h"
|
||||
#include "Transaction/Status.h"
|
||||
|
||||
NS_BEGIN(arangodb)
|
||||
NS_BEGIN(iresearch)
|
||||
namespace arangodb {
|
||||
namespace iresearch {
|
||||
|
||||
class AsyncMeta; // forward declaration
|
||||
class IResearchView; // forward declaration
|
||||
|
@ -261,7 +261,7 @@ class IResearchLink {
|
|||
arangodb::Result initDataStore();
|
||||
}; // IResearchLink
|
||||
|
||||
NS_END // iresearch
|
||||
NS_END // arangodb
|
||||
} // namespace iresearch
|
||||
} // namespace arangodb
|
||||
|
||||
#endif
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include "IResearchLinkMeta.h"
|
||||
#include "Misc.h"
|
||||
|
||||
NS_LOCAL
|
||||
namespace {
|
||||
|
||||
bool equalAnalyzers(arangodb::iresearch::IResearchLinkMeta::Analyzers const& lhs,
|
||||
arangodb::iresearch::IResearchLinkMeta::Analyzers const& rhs) noexcept {
|
||||
|
@ -64,10 +64,10 @@ bool equalAnalyzers(arangodb::iresearch::IResearchLinkMeta::Analyzers const& lhs
|
|||
return true;
|
||||
}
|
||||
|
||||
NS_END
|
||||
} // namespace
|
||||
|
||||
NS_BEGIN(arangodb)
|
||||
NS_BEGIN(iresearch)
|
||||
namespace arangodb {
|
||||
namespace iresearch {
|
||||
|
||||
IResearchLinkMeta::Mask::Mask(bool mask /*= false*/) noexcept
|
||||
: _analyzers(mask),
|
||||
|
@ -473,9 +473,9 @@ size_t IResearchLinkMeta::memory() const noexcept {
|
|||
return size;
|
||||
}
|
||||
|
||||
NS_END // iresearch
|
||||
NS_END // arangodb
|
||||
} // namespace iresearch
|
||||
} // namespace arangodb
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- END-OF-FILE
|
||||
// -----------------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- END-OF-FILE
|
||||
// -----------------------------------------------------------------------------
|
||||
|
|
|
@ -34,31 +34,32 @@
|
|||
#include "Containers.h"
|
||||
#include "IResearchAnalyzerFeature.h"
|
||||
|
||||
NS_BEGIN(arangodb)
|
||||
NS_BEGIN(velocypack)
|
||||
namespace arangodb {
|
||||
namespace velocypack {
|
||||
|
||||
class Builder; // forward declarations
|
||||
struct ObjectBuilder; // forward declarations
|
||||
class Slice; // forward declarations
|
||||
|
||||
NS_END // velocypack
|
||||
NS_END // arangodb
|
||||
} // namespace velocypack
|
||||
} // namespace arangodb
|
||||
|
||||
NS_BEGIN(arangodb) NS_BEGIN(iresearch)
|
||||
namespace arangodb {
|
||||
namespace iresearch {
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- public
|
||||
// types
|
||||
// -----------------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- public
|
||||
// types
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief enum of possible ways to store values in the view
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
enum class ValueStorage : uint32_t {
|
||||
NONE = 0, // do not store values in the view
|
||||
ID, // only store value existance
|
||||
FULL, // store full value in the view
|
||||
};
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief enum of possible ways to store values in the view
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
enum class ValueStorage : uint32_t {
|
||||
NONE = 0, // do not store values in the view
|
||||
ID, // only store value existance
|
||||
FULL, // store full value in the view
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief metadata describing how to process a field in a collection
|
||||
|
@ -146,7 +147,7 @@ struct IResearchLinkMeta {
|
|||
size_t memory() const noexcept;
|
||||
}; // IResearchLinkMeta
|
||||
|
||||
NS_END // iresearch
|
||||
NS_END // arangodb
|
||||
} // namespace iresearch
|
||||
} // namespace arangodb
|
||||
|
||||
#endif
|
||||
|
|
|
@ -35,8 +35,8 @@
|
|||
|
||||
#include "IResearchMMFilesLink.h"
|
||||
|
||||
NS_BEGIN(arangodb)
|
||||
NS_BEGIN(iresearch)
|
||||
namespace arangodb {
|
||||
namespace iresearch {
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief IResearchMMFilesLink-specific implementation of an IndexTypeFactory
|
||||
|
@ -174,9 +174,9 @@ bool IResearchMMFilesLink::isPersistent() const {
|
|||
return true; // records persisted into the iResearch view
|
||||
}
|
||||
|
||||
NS_END // iresearch
|
||||
NS_END // arangodb
|
||||
} // namespace iresearch
|
||||
} // namespace arangodb
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- END-OF-FILE
|
||||
// -----------------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- END-OF-FILE
|
||||
// -----------------------------------------------------------------------------
|
|
@ -33,8 +33,8 @@ namespace arangodb {
|
|||
struct IndexTypeFactory; // forward declaration
|
||||
}
|
||||
|
||||
NS_BEGIN(arangodb)
|
||||
NS_BEGIN(iresearch)
|
||||
namespace arangodb {
|
||||
namespace iresearch {
|
||||
|
||||
class IResearchMMFilesLink final : public arangodb::MMFilesIndex, public IResearchLink {
|
||||
public:
|
||||
|
@ -131,7 +131,7 @@ class IResearchMMFilesLink final : public arangodb::MMFilesIndex, public IResear
|
|||
IResearchMMFilesLink(TRI_idx_iid_t iid, arangodb::LogicalCollection& collection);
|
||||
};
|
||||
|
||||
NS_END // iresearch
|
||||
NS_END // arangodb
|
||||
} // namespace iresearch
|
||||
} // namespace arangodb
|
||||
|
||||
#endif
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
// --SECTION-- OrderFactory dependencies
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
NS_LOCAL
|
||||
namespace {
|
||||
|
||||
arangodb::aql::AstNode const EMPTY_ARGS(arangodb::aql::NODE_TYPE_ARRAY);
|
||||
|
||||
|
@ -200,10 +200,10 @@ bool fromFCallUser(irs::sort::ptr* scorer, arangodb::aql::AstNode const& node,
|
|||
return fromFCall(scorer, scorerName, node.getMemberUnchecked(0), ctx);
|
||||
}
|
||||
|
||||
NS_END
|
||||
} // namespace
|
||||
|
||||
NS_BEGIN(arangodb)
|
||||
NS_BEGIN(iresearch)
|
||||
namespace arangodb {
|
||||
namespace iresearch {
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// --SECTION-- ScorerReplacer implementation
|
||||
|
@ -340,9 +340,9 @@ void ScorerReplacer::extract(aql::Variable const& var, std::vector<Scorer>& scor
|
|||
return bool(*comparer);
|
||||
}
|
||||
|
||||
NS_END // iresearch
|
||||
NS_END // arangodb
|
||||
} // namespace iresearch
|
||||
} // namespace arangodb
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- END-OF-FILE
|
||||
// -----------------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- END-OF-FILE
|
||||
// -----------------------------------------------------------------------------
|
||||
|
|
|
@ -30,8 +30,8 @@
|
|||
|
||||
#include "search/sort.hpp"
|
||||
|
||||
NS_BEGIN(arangodb)
|
||||
NS_BEGIN(aql)
|
||||
namespace arangodb {
|
||||
namespace aql {
|
||||
|
||||
class Ast;
|
||||
struct AstNode;
|
||||
|
@ -39,26 +39,26 @@ class CalculationNode;
|
|||
struct Expression;
|
||||
struct Variable;
|
||||
|
||||
NS_END // aql
|
||||
} // namespace aql
|
||||
|
||||
NS_BEGIN(iresearch)
|
||||
namespace iresearch {
|
||||
|
||||
struct QueryContext;
|
||||
struct QueryContext;
|
||||
|
||||
NS_END // iresearch
|
||||
} // namespace iresearch
|
||||
|
||||
NS_BEGIN(transaction)
|
||||
namespace transaction {
|
||||
|
||||
class Methods; // forward declaration
|
||||
class Methods; // forward declaration
|
||||
|
||||
NS_END // transaction
|
||||
} // namespace transaction
|
||||
|
||||
NS_BEGIN(iresearch)
|
||||
namespace iresearch {
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @struct OrderFactory
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
struct OrderFactory {
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @struct OrderFactory
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
struct OrderFactory {
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief determine if the 'node' can be converted into an iresearch scorer
|
||||
/// if 'scorer' != nullptr then also append build iresearch scorer there
|
||||
|
@ -160,7 +160,7 @@ class ScorerReplacer {
|
|||
DedupScorers _dedup;
|
||||
}; // ScorerReplacer
|
||||
|
||||
NS_END // iresearch
|
||||
NS_END // arangodb
|
||||
} // namespace iresearch
|
||||
} // namespace arangodb
|
||||
|
||||
#endif // ARANGOD_IRESEARCH__IRESEARCH_ORDER_FACTORY_H
|
||||
|
|
|
@ -35,8 +35,8 @@
|
|||
|
||||
#include "IResearchRocksDBLink.h"
|
||||
|
||||
NS_BEGIN(arangodb)
|
||||
NS_BEGIN(iresearch)
|
||||
namespace arangodb {
|
||||
namespace iresearch {
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief IResearchRocksDBLink-specific implementation of an IndexTypeFactory
|
||||
|
@ -148,8 +148,8 @@ void IResearchRocksDBLink::toVelocyPack(arangodb::velocypack::Builder& builder,
|
|||
builder.close();
|
||||
}
|
||||
|
||||
NS_END // iresearch
|
||||
NS_END // arangodb
|
||||
} // namespace iresearch
|
||||
} // namespace arangodb
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- END-OF-FILE
|
||||
|
|
|
@ -33,8 +33,8 @@ namespace arangodb {
|
|||
struct IndexTypeFactory; // forward declaration
|
||||
}
|
||||
|
||||
NS_BEGIN(arangodb)
|
||||
NS_BEGIN(iresearch)
|
||||
namespace arangodb {
|
||||
namespace iresearch {
|
||||
|
||||
class IResearchRocksDBLink final : public arangodb::RocksDBIndex, public IResearchLink {
|
||||
public:
|
||||
|
@ -132,7 +132,7 @@ class IResearchRocksDBLink final : public arangodb::RocksDBIndex, public IResear
|
|||
IResearchRocksDBLink(TRI_idx_iid_t iid, arangodb::LogicalCollection& collection);
|
||||
};
|
||||
|
||||
NS_END // iresearch
|
||||
NS_END // arangodb
|
||||
} // namespace iresearch
|
||||
} // namespace arangodb
|
||||
|
||||
#endif
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
#include "IResearchViewMeta.h"
|
||||
|
||||
NS_LOCAL
|
||||
namespace {
|
||||
|
||||
const std::string POLICY_BYTES_ACCUM =
|
||||
"bytes_accum"; // {threshold} > (segment_bytes +
|
||||
|
@ -172,10 +172,10 @@ arangodb::iresearch::IResearchViewMeta::ConsolidationPolicy createConsolidationP
|
|||
irs::index_utils::consolidation_policy(options), std::move(properties)};
|
||||
}
|
||||
|
||||
NS_END
|
||||
} // namespace
|
||||
|
||||
NS_BEGIN(arangodb)
|
||||
NS_BEGIN(iresearch)
|
||||
namespace arangodb {
|
||||
namespace iresearch {
|
||||
|
||||
IResearchViewMeta::Mask::Mask(bool mask /*=false*/) noexcept
|
||||
: _cleanupIntervalStep(mask),
|
||||
|
@ -727,9 +727,9 @@ size_t IResearchViewMetaState::memory() const {
|
|||
return size;
|
||||
}
|
||||
|
||||
NS_END // iresearch
|
||||
NS_END // arangodb
|
||||
} // namespace iresearch
|
||||
} // namespace arangodb
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- END-OF-FILE
|
||||
// -----------------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- END-OF-FILE
|
||||
// -----------------------------------------------------------------------------
|
||||
|
|
|
@ -31,26 +31,27 @@
|
|||
#include "index/index_writer.hpp"
|
||||
#include "velocypack/Builder.h"
|
||||
|
||||
NS_BEGIN(arangodb)
|
||||
NS_BEGIN(velocypack)
|
||||
namespace arangodb {
|
||||
namespace velocypack {
|
||||
|
||||
struct ObjectBuilder; // forward declarations
|
||||
class Slice; // forward declarations
|
||||
|
||||
NS_END // velocypack
|
||||
NS_END // arangodb
|
||||
} // namespace velocypack
|
||||
} // namespace arangodb
|
||||
|
||||
NS_BEGIN(arangodb) NS_BEGIN(iresearch)
|
||||
namespace arangodb {
|
||||
namespace iresearch {
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- public
|
||||
// types
|
||||
// -----------------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- public
|
||||
// types
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief metadata describing the IResearch view
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
struct IResearchViewMeta {
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief metadata describing the IResearch view
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
struct IResearchViewMeta {
|
||||
class ConsolidationPolicy {
|
||||
public:
|
||||
ConsolidationPolicy() = default;
|
||||
|
@ -233,7 +234,7 @@ struct IResearchViewMetaState {
|
|||
size_t memory() const;
|
||||
};
|
||||
|
||||
NS_END // iresearch
|
||||
NS_END // arangodb
|
||||
} // namespace iresearch
|
||||
} // namespace arangodb
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -213,8 +213,8 @@ bool parseOptions(aql::AstNode const* optionsNode,
|
|||
|
||||
// in loop or non-deterministic
|
||||
bool hasDependencies(aql::ExecutionPlan const& plan, aql::AstNode const& node,
|
||||
aql::Variable const& ref,
|
||||
std::unordered_set<aql::Variable const*>& vars) {
|
||||
aql::Variable const& ref,
|
||||
std::unordered_set<aql::Variable const*>& vars) {
|
||||
if (!node.isDeterministic()) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
#include "velocypack/Builder.h"
|
||||
#include "velocypack/Iterator.h"
|
||||
|
||||
NS_BEGIN(arangodb)
|
||||
NS_BEGIN(iresearch)
|
||||
namespace arangodb {
|
||||
namespace iresearch {
|
||||
|
||||
bool mergeSlice(arangodb::velocypack::Builder& builder,
|
||||
arangodb::velocypack::Slice const& slice) {
|
||||
|
@ -144,9 +144,9 @@ ObjectIterator& ObjectIterator::operator++() {
|
|||
return *this;
|
||||
}
|
||||
|
||||
NS_END // iresearch
|
||||
NS_END // arangodb
|
||||
} // namespace iresearch
|
||||
} // namespace arangodb
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- END-OF-FILE
|
||||
// -----------------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- END-OF-FILE
|
||||
// -----------------------------------------------------------------------------
|
|
@ -31,18 +31,19 @@
|
|||
|
||||
#include "utils/string.hpp" // for irs::string_ref
|
||||
|
||||
NS_BEGIN(arangodb)
|
||||
NS_BEGIN(velocypack)
|
||||
namespace arangodb {
|
||||
namespace velocypack {
|
||||
|
||||
class Builder; // forward declarations
|
||||
|
||||
NS_END // velocypack
|
||||
NS_END // arangodb
|
||||
} // namespace velocypack
|
||||
} // namespace arangodb
|
||||
|
||||
NS_BEGIN(arangodb) NS_BEGIN(iresearch)
|
||||
namespace arangodb {
|
||||
namespace iresearch {
|
||||
|
||||
// according to Slice.h:330
|
||||
uint8_t const COMPACT_ARRAY = 0x13;
|
||||
// according to Slice.h:330
|
||||
uint8_t const COMPACT_ARRAY = 0x13;
|
||||
uint8_t const COMPACT_OBJECT = 0x14;
|
||||
|
||||
inline bool isArrayOrObject(VPackSlice const& slice) {
|
||||
|
@ -375,7 +376,7 @@ class ObjectIterator {
|
|||
std::vector<Iterator> _stack;
|
||||
}; // ObjectIterator
|
||||
|
||||
NS_END // iresearch
|
||||
NS_END // arangodb
|
||||
} // namespace iresearch
|
||||
} // namespace arangodb
|
||||
|
||||
#endif
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
|
||||
extern const char* ARGV0; // defined in main.cpp
|
||||
|
||||
NS_LOCAL
|
||||
namespace {
|
||||
|
||||
struct custom_sort: public irs::sort {
|
||||
DECLARE_SORT_TYPE();
|
||||
|
@ -326,7 +326,7 @@ struct IResearchExpressionFilterSetup {
|
|||
}
|
||||
}; // TestSetup
|
||||
|
||||
NS_END
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- test suite
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
#include "VocBase/LogicalCollection.h"
|
||||
#include "VocBase/ManagedDocumentResult.h"
|
||||
|
||||
NS_LOCAL
|
||||
namespace {
|
||||
|
||||
struct TestAttribute: public irs::attribute {
|
||||
DECLARE_ATTRIBUTE_TYPE();
|
||||
|
@ -172,7 +172,7 @@ struct StorageEngineWrapper {
|
|||
StorageEngineMock& operator*() { return instance; }
|
||||
};
|
||||
|
||||
NS_END
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- setup / tear-down
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
#include "search/boolean_filter.hpp"
|
||||
#include "search/phrase_filter.hpp"
|
||||
|
||||
NS_LOCAL
|
||||
namespace {
|
||||
|
||||
struct TestAttribute: public irs::attribute {
|
||||
DECLARE_ATTRIBUTE_TYPE();
|
||||
|
@ -126,7 +126,7 @@ class TestAnalyzer: public irs::analysis::analyzer {
|
|||
DEFINE_ANALYZER_TYPE_NAMED(TestAnalyzer, "TestCharAnalyzer");
|
||||
REGISTER_ANALYZER_JSON(TestAnalyzer, TestAnalyzer::make);
|
||||
|
||||
NS_END
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- setup / tear-down
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
#include "VocBase/LogicalCollection.h"
|
||||
#include "VocBase/LogicalView.h"
|
||||
|
||||
NS_LOCAL
|
||||
namespace {
|
||||
|
||||
struct TestAttributeX: public irs::attribute {
|
||||
DECLARE_ATTRIBUTE_TYPE();
|
||||
|
@ -210,7 +210,7 @@ struct IResearchIndexSetup {
|
|||
}
|
||||
};
|
||||
|
||||
NS_END
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- test suite
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
#include "velocypack/Iterator.h"
|
||||
#include "velocypack/Parser.h"
|
||||
|
||||
NS_LOCAL
|
||||
namespace {
|
||||
|
||||
struct TestAttribute: public irs::attribute {
|
||||
DECLARE_ATTRIBUTE_TYPE();
|
||||
|
@ -86,7 +86,7 @@ private:
|
|||
DEFINE_ANALYZER_TYPE_NAMED(EmptyAnalyzer, "empty");
|
||||
REGISTER_ANALYZER_JSON(EmptyAnalyzer, EmptyAnalyzer::make);
|
||||
|
||||
NS_END
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- setup / tear-down
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
#include "search/scorers.hpp"
|
||||
#include "utils/misc.hpp"
|
||||
|
||||
NS_LOCAL
|
||||
namespace {
|
||||
|
||||
struct dummy_scorer: public irs::sort {
|
||||
static std::function<bool(irs::string_ref const&)> validateArgs;
|
||||
|
@ -209,7 +209,7 @@ void assertOrderParseFail(std::string const& queryString, size_t parseCode) {
|
|||
REQUIRE(parseCode == parseResult.code);
|
||||
}
|
||||
|
||||
NS_END
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- setup / tear-down
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
|
||||
#include <velocypack/Iterator.h>
|
||||
|
||||
NS_LOCAL
|
||||
namespace {
|
||||
|
||||
struct TestTermAttribute: public irs::term_attribute {
|
||||
public:
|
||||
|
@ -131,7 +131,7 @@ class TestDelimAnalyzer: public irs::analysis::analyzer {
|
|||
DEFINE_ANALYZER_TYPE_NAMED(TestDelimAnalyzer, "TestDelimAnalyzer");
|
||||
REGISTER_ANALYZER_JSON(TestDelimAnalyzer, TestDelimAnalyzer::make);
|
||||
|
||||
NS_END
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- setup / tear-down
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
|
||||
extern const char* ARGV0; // defined in main.cpp
|
||||
|
||||
NS_LOCAL
|
||||
namespace {
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- setup / tear-down
|
||||
|
@ -163,7 +163,7 @@ struct IResearchQueryAggregateSetup {
|
|||
}
|
||||
}; // IResearchQuerySetup
|
||||
|
||||
NS_END
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- test suite
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
|
||||
extern const char* ARGV0; // defined in main.cpp
|
||||
|
||||
NS_LOCAL
|
||||
namespace {
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- setup / tear-down
|
||||
|
@ -163,7 +163,7 @@ struct IResearchQueryAndSetup {
|
|||
}
|
||||
}; // IResearchQuerySetup
|
||||
|
||||
NS_END
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- test suite
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
|
||||
extern const char* ARGV0; // defined in main.cpp
|
||||
|
||||
NS_LOCAL
|
||||
namespace {
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- setup / tear-down
|
||||
|
@ -164,7 +164,7 @@ struct IResearchQueryBooleanTermSetup {
|
|||
}
|
||||
}; // IResearchQuerySetup
|
||||
|
||||
NS_END
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- test suite
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
|
||||
extern const char* ARGV0; // defined in main.cpp
|
||||
|
||||
NS_LOCAL
|
||||
namespace {
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- setup / tear-down
|
||||
|
@ -173,7 +173,7 @@ struct IResearchQueryComplexBooleanSetup {
|
|||
}
|
||||
}; // IResearchQuerySetup
|
||||
|
||||
NS_END
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- test suite
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
|
||||
extern const char* ARGV0; // defined in main.cpp
|
||||
|
||||
NS_LOCAL
|
||||
namespace {
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- setup / tear-down
|
||||
|
@ -165,7 +165,7 @@ struct IResearchQueryExistsSetup {
|
|||
}
|
||||
}; // IResearchQuerySetup
|
||||
|
||||
NS_END
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- test suite
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
|
||||
extern const char* ARGV0; // defined in main.cpp
|
||||
|
||||
NS_LOCAL
|
||||
namespace {
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- setup / tear-down
|
||||
|
@ -164,7 +164,7 @@ struct IResearchQueryInSetup {
|
|||
}
|
||||
}; // IResearchQuerySetup
|
||||
|
||||
NS_END
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- test suite
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
|
||||
extern const char* ARGV0; // defined in main.cpp
|
||||
|
||||
NS_LOCAL
|
||||
namespace {
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- setup / tear-down
|
||||
|
@ -208,7 +208,7 @@ struct IResearchQueryJoinSetup {
|
|||
}
|
||||
}; // IResearchQuerySetup
|
||||
|
||||
NS_END
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- test suite
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
|
||||
extern const char* ARGV0; // defined in main.cpp
|
||||
|
||||
NS_LOCAL
|
||||
namespace {
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- setup / tear-down
|
||||
|
@ -163,7 +163,7 @@ struct IResearchQueryNullTermSetup {
|
|||
}
|
||||
}; // IResearchQuerySetup
|
||||
|
||||
NS_END
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- test suite
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
|
||||
extern const char* ARGV0; // defined in main.cpp
|
||||
|
||||
NS_LOCAL
|
||||
namespace {
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- setup / tear-down
|
||||
|
@ -164,7 +164,7 @@ struct IResearchQueryNumericTermSetup {
|
|||
}
|
||||
}; // IResearchQuerySetup
|
||||
|
||||
NS_END
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- test suite
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
|
||||
extern const char* ARGV0; // defined in main.cpp
|
||||
|
||||
NS_LOCAL
|
||||
namespace {
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- setup / tear-down
|
||||
|
@ -174,7 +174,7 @@ struct IResearchQueryOrSetup {
|
|||
}
|
||||
}; // IResearchQuerySetup
|
||||
|
||||
NS_END
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- test suite
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
|
||||
extern const char* ARGV0; // defined in main.cpp
|
||||
|
||||
NS_LOCAL
|
||||
namespace {
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- setup / tear-down
|
||||
|
@ -173,7 +173,7 @@ struct IResearchQueryPhraseSetup {
|
|||
}
|
||||
}; // IResearchQuerySetup
|
||||
|
||||
NS_END
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- test suite
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
|
||||
extern const char* ARGV0; // defined in main.cpp
|
||||
|
||||
NS_LOCAL
|
||||
namespace {
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- setup / tear-down
|
||||
|
@ -210,7 +210,7 @@ struct IResearchQueryScorerSetup {
|
|||
}
|
||||
}; // IResearchQueryScorerSetup
|
||||
|
||||
NS_END
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- test suite
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
|
||||
extern const char* ARGV0; // defined in main.cpp
|
||||
|
||||
NS_LOCAL
|
||||
namespace {
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- setup / tear-down
|
||||
|
@ -164,7 +164,7 @@ struct IResearchQuerySelectAllSetup {
|
|||
}
|
||||
}; // IResearchQuerySetup
|
||||
|
||||
NS_END
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- test suite
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
|
||||
extern const char* ARGV0; // defined in main.cpp
|
||||
|
||||
NS_LOCAL
|
||||
namespace {
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- setup / tear-down
|
||||
|
@ -164,7 +164,7 @@ struct IResearchQueryStartsWithSetup {
|
|||
}
|
||||
}; // IResearchQuerySetup
|
||||
|
||||
NS_END
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- test suite
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
|
||||
extern const char* ARGV0; // defined in main.cpp
|
||||
|
||||
NS_LOCAL
|
||||
namespace {
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- setup / tear-down
|
||||
|
@ -195,7 +195,7 @@ struct IResearchQueryStringTermSetup {
|
|||
}
|
||||
}; // IResearchQuerySetup
|
||||
|
||||
NS_END
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- test suite
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
|
||||
#include <velocypack/Iterator.h>
|
||||
|
||||
NS_LOCAL
|
||||
namespace {
|
||||
|
||||
struct TestTermAttribute: public irs::term_attribute {
|
||||
public:
|
||||
|
@ -171,7 +171,7 @@ struct IResearchQueryTokensSetup {
|
|||
}
|
||||
}; // IResearchQuerySetup
|
||||
|
||||
NS_END
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- test suite
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
|
||||
extern const char* ARGV0; // defined in main.cpp
|
||||
|
||||
NS_LOCAL
|
||||
namespace {
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- setup / tear-down
|
||||
|
@ -163,7 +163,7 @@ struct IResearchQueryTraversalSetup {
|
|||
}
|
||||
}; // IResearchQuerySetup
|
||||
|
||||
NS_END
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- test suite
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
|
||||
extern const char* ARGV0; // defined in main.cpp
|
||||
|
||||
NS_LOCAL
|
||||
namespace {
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- setup / tear-down
|
||||
|
@ -163,7 +163,7 @@ struct IResearchQueryValueSetup {
|
|||
}
|
||||
}; // IResearchQuerySetup
|
||||
|
||||
NS_END
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- test suite
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
#include "VocBase/LogicalView.h"
|
||||
#include "VocBase/ManagedDocumentResult.h"
|
||||
|
||||
NS_LOCAL
|
||||
namespace {
|
||||
|
||||
struct DocIdScorer: public irs::sort {
|
||||
DECLARE_SORT_TYPE() { static irs::sort::type_id type("test_doc_id"); return type; }
|
||||
|
@ -124,7 +124,7 @@ struct DocIdScorer: public irs::sort {
|
|||
|
||||
REGISTER_SCORER_TEXT(DocIdScorer, DocIdScorer::make);
|
||||
|
||||
NS_END
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- setup / tear-down
|
||||
|
@ -6341,4 +6341,4 @@ SECTION("test_update_partial") {
|
|||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- END-OF-FILE
|
||||
// -----------------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue