diff options
10 files changed, 38 insertions, 31 deletions
diff --git a/searchcore/src/tests/proton/docsummary/summaryfieldconverter_test.cpp b/searchcore/src/tests/proton/docsummary/summaryfieldconverter_test.cpp index 8f9e0836191..113113af195 100644 --- a/searchcore/src/tests/proton/docsummary/summaryfieldconverter_test.cpp +++ b/searchcore/src/tests/proton/docsummary/summaryfieldconverter_test.cpp @@ -34,9 +34,9 @@ #include <vespa/document/predicate/predicate.h> #include <vespa/document/repo/configbuilder.h> #include <vespa/document/repo/documenttyperepo.h> -#include <vespa/searchcore/proton/docsummary/summaryfieldconverter.h> -#include <vespa/searchcore/proton/docsummary/linguisticsannotation.h> -#include <vespa/searchcore/proton/docsummary/searchdatatype.h> +#include <vespa/searchsummary/docsummary/summaryfieldconverter.h> +#include <vespa/searchsummary/docsummary/linguisticsannotation.h> +#include <vespa/searchsummary/docsummary/searchdatatype.h> #include <vespa/searchcommon/common/schema.h> #include <vespa/config-summarymap.h> #include <vespa/vespalib/geo/zcurve.h> @@ -92,8 +92,9 @@ using search::index::Schema; using vespalib::Slime; using vespalib::slime::Cursor; using vespalib::string; -using namespace proton; -using namespace proton::linguistics; +using search::linguistics::SPANTREE_NAME; +using search::linguistics::TERM; +using namespace search::docsummary; using vespalib::geo::ZCurve; using vespalib::tensor::Tensor; using vespalib::tensor::TensorCells; @@ -649,11 +650,11 @@ void Test::requireThatSearchDataTypeUsesDefaultDataTypes() { } void Test::requireThatLinguisticsAnnotationUsesDefaultDataTypes() { - EXPECT_EQUAL(*AnnotationType::TERM, *linguistics::TERM); + EXPECT_EQUAL(*AnnotationType::TERM, *search::linguistics::TERM); ASSERT_TRUE(AnnotationType::TERM->getDataType()); - ASSERT_TRUE(linguistics::TERM->getDataType()); + ASSERT_TRUE(search::linguistics::TERM->getDataType()); EXPECT_EQUAL(*AnnotationType::TERM->getDataType(), - *linguistics::TERM->getDataType()); + *search::linguistics::TERM->getDataType()); } void diff --git a/searchcore/src/vespa/searchcore/proton/docsummary/CMakeLists.txt b/searchcore/src/vespa/searchcore/proton/docsummary/CMakeLists.txt index 37e2e691a4f..19b968f49f3 100644 --- a/searchcore/src/vespa/searchcore/proton/docsummary/CMakeLists.txt +++ b/searchcore/src/vespa/searchcore/proton/docsummary/CMakeLists.txt @@ -6,10 +6,7 @@ vespa_add_library(searchcore_docsummary STATIC documentstoreadapter.cpp fieldcache.cpp fieldcacherepo.cpp - linguisticsannotation.cpp - searchdatatype.cpp summarycompacttarget.cpp - summaryfieldconverter.cpp summaryflushtarget.cpp summarymanager.cpp summarymanagerinitializer.cpp diff --git a/searchcore/src/vespa/searchcore/proton/docsummary/documentstoreadapter.cpp b/searchcore/src/vespa/searchcore/proton/docsummary/documentstoreadapter.cpp index 4278e71b63c..fc5f1288f00 100644 --- a/searchcore/src/vespa/searchcore/proton/docsummary/documentstoreadapter.cpp +++ b/searchcore/src/vespa/searchcore/proton/docsummary/documentstoreadapter.cpp @@ -1,7 +1,7 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "documentstoreadapter.h" -#include "summaryfieldconverter.h" +#include <vespa/searchsummary/docsummary/summaryfieldconverter.h> #include <vespa/document/fieldvalue/stringfieldvalue.h> #include <vespa/eval/tensor/tensor.h> #include <vespa/eval/tensor/serialization/typed_binary_format.h> diff --git a/searchsummary/src/vespa/searchsummary/docsummary/CMakeLists.txt b/searchsummary/src/vespa/searchsummary/docsummary/CMakeLists.txt index bbd7dc1e177..03635dd36be 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/CMakeLists.txt +++ b/searchsummary/src/vespa/searchsummary/docsummary/CMakeLists.txt @@ -21,6 +21,9 @@ vespa_add_library(searchsummary_docsummary OBJECT geoposdfw.cpp tokenizer.cpp positionsdfw.cpp + linguisticsannotation.cpp + searchdatatype.cpp + summaryfieldconverter.cpp AFTER searchsummary_config ) diff --git a/searchcore/src/vespa/searchcore/proton/docsummary/linguisticsannotation.cpp b/searchsummary/src/vespa/searchsummary/docsummary/linguisticsannotation.cpp index 47f046bfd42..124396aac5a 100644 --- a/searchcore/src/vespa/searchcore/proton/docsummary/linguisticsannotation.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/linguisticsannotation.cpp @@ -2,7 +2,7 @@ #include <vespa/fastos/fastos.h> #include <vespa/log/log.h> -LOG_SETUP(".proton.docsummary.linguisticsannotation"); +LOG_SETUP(".searchsummary.docsummary.linguisticsannotation"); #include "linguisticsannotation.h" #include <vespa/document/datatype/datatype.h> @@ -13,8 +13,9 @@ using document::DataType; using document::PrimitiveDataType; using vespalib::string; -namespace proton { +namespace search { namespace linguistics { + namespace { AnnotationType makeType(int id, string name, const DataType &type) { AnnotationType annotation_type(id, name); @@ -29,5 +30,5 @@ AnnotationType TERM_OBJ(makeType(1, "term", STRING_OBJ)); const string SPANTREE_NAME("linguistics"); const AnnotationType *const TERM(&TERM_OBJ); -} // namespace linguistics -} // namespace proton +} // namespace search::linguistics +} // namespace search diff --git a/searchcore/src/vespa/searchcore/proton/docsummary/linguisticsannotation.h b/searchsummary/src/vespa/searchsummary/docsummary/linguisticsannotation.h index ef9d3cc29f2..21aa3bce49e 100644 --- a/searchcore/src/vespa/searchcore/proton/docsummary/linguisticsannotation.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/linguisticsannotation.h @@ -5,12 +5,11 @@ #include <vespa/document/datatype/annotationtype.h> #include <vespa/vespalib/stllike/string.h> -namespace proton { +namespace search { namespace linguistics { extern const vespalib::string SPANTREE_NAME; extern const document::AnnotationType *const TERM; -} // namespace linguistics; -} // namespace proton - +} // namespace search::linguistics +} // namespace search diff --git a/searchcore/src/vespa/searchcore/proton/docsummary/searchdatatype.cpp b/searchsummary/src/vespa/searchsummary/docsummary/searchdatatype.cpp index c2b7dc68b5c..6e60628739a 100644 --- a/searchcore/src/vespa/searchcore/proton/docsummary/searchdatatype.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/searchdatatype.cpp @@ -2,7 +2,7 @@ #include <vespa/fastos/fastos.h> #include <vespa/log/log.h> -LOG_SETUP(".proton.docsummary.searchdatatype"); +LOG_SETUP(".search.docsummary.searchdatatype"); #include "searchdatatype.h" #include <vespa/document/base/field.h> @@ -14,7 +14,8 @@ using document::Field; using document::PrimitiveDataType; using document::StructDataType; -namespace proton { +namespace search { +namespace docsummary { namespace { @@ -35,4 +36,5 @@ const StructDataType *setUpUriType() { const DataType *SearchDataType::URI(setUpUriType()); -} // namespace proton +} // namespace search::docsummary +} // namespace search diff --git a/searchcore/src/vespa/searchcore/proton/docsummary/searchdatatype.h b/searchsummary/src/vespa/searchsummary/docsummary/searchdatatype.h index 7bc8875584d..115aed9cbdb 100644 --- a/searchcore/src/vespa/searchcore/proton/docsummary/searchdatatype.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/searchdatatype.h @@ -4,11 +4,12 @@ #include <vespa/document/datatype/datatype.h> -namespace proton { +namespace search { +namespace docsummary { struct SearchDataType { static const document::DataType *URI; }; -} // namespace proton - +} // namespace search::docsummary +} // namespace search diff --git a/searchcore/src/vespa/searchcore/proton/docsummary/summaryfieldconverter.cpp b/searchsummary/src/vespa/searchsummary/docsummary/summaryfieldconverter.cpp index e4cb28b56e8..92378ed83ce 100644 --- a/searchcore/src/vespa/searchcore/proton/docsummary/summaryfieldconverter.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/summaryfieldconverter.cpp @@ -93,7 +93,8 @@ using vespalib::make_string; using vespalib::string; using vespalib::stringref; -namespace proton { +namespace search { +namespace docsummary { namespace { string getSpanString(const string &s, const Span &span) { @@ -703,4 +704,5 @@ SummaryFieldConverter::convertSummaryField(bool markup, } -} // namespace proton +} // namespace search::docsummary +} // namespace search diff --git a/searchcore/src/vespa/searchcore/proton/docsummary/summaryfieldconverter.h b/searchsummary/src/vespa/searchsummary/docsummary/summaryfieldconverter.h index 9507b8cab8d..9d6f54755cc 100644 --- a/searchcore/src/vespa/searchcore/proton/docsummary/summaryfieldconverter.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/summaryfieldconverter.h @@ -4,7 +4,8 @@ #include <vespa/document/fieldvalue/fieldvalue.h> -namespace proton { +namespace search { +namespace docsummary { /** * This class converts a summary field for docsum fetching. @@ -16,5 +17,5 @@ public: convertSummaryField(bool markup, const document::FieldValue &value, bool useSlimeInsideFields); }; -} // namespace proton - +} // namespace search::docsummary +} // namespace search |