summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-02-09 14:56:01 +0200
committerGitHub <noreply@github.com>2017-02-09 14:56:01 +0200
commitee78e9d3af060ee832c9527d09e8f858ae2f7bbf (patch)
treeba35d796b45fbdd14e44d63bb3ca9820bbd73d2c /searchcore
parent1f986c231a7f1867996c4cbf63d05190e388037c (diff)
parent67896d19084c7607a74093fcaea8ebf3d0194904 (diff)
Merge pull request #1719 from yahoo/balder/implement-get_hits-for-attribute-postinglist-iterators
Balder/implement get hits for attribute postinglist iterators
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp1
-rw-r--r--searchcore/src/vespa/searchcore/fdispatch/common/stdincl.h4
-rw-r--r--searchcore/src/vespa/searchcore/fdispatch/search/configdesc.cpp7
-rw-r--r--searchcore/src/vespa/searchcore/fdispatch/search/configdesc.h6
-rw-r--r--searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp6
-rw-r--r--searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/documentmetastore/search_context.cpp5
-rw-r--r--searchcore/src/vespa/searchcore/proton/documentmetastore/search_context.h13
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/match_thread.h10
11 files changed, 26 insertions, 34 deletions
diff --git a/searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp b/searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp
index bffedd30a9f..43738438fc6 100644
--- a/searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp
+++ b/searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp
@@ -16,6 +16,7 @@
#include <vespa/vespalib/util/exceptions.h>
#include <vespa/searchcore/proton/server/itlssyncer.h>
#include <vespa/searchcore/proton/common/hw_info.h>
+#include <vespa/searchlib/query/queryterm.h>
#include <vespa/log/log.h>
LOG_SETUP("documentmetastore_test");
diff --git a/searchcore/src/vespa/searchcore/fdispatch/common/stdincl.h b/searchcore/src/vespa/searchcore/fdispatch/common/stdincl.h
index f0378b951a4..f6649cb7357 100644
--- a/searchcore/src/vespa/searchcore/fdispatch/common/stdincl.h
+++ b/searchcore/src/vespa/searchcore/fdispatch/common/stdincl.h
@@ -1,9 +1,9 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-// Copyright (C) 1999-2003 Fast Search & Transfer ASA
-// Copyright (C) 2003 Overture Services Norway AS
#pragma once
+#include <cstdint>
+
/**
* This method defines the illegal/undefined value for unsigned 32-bit
* integer ids.
diff --git a/searchcore/src/vespa/searchcore/fdispatch/search/configdesc.cpp b/searchcore/src/vespa/searchcore/fdispatch/search/configdesc.cpp
index 4a71bc1f3fa..773f6607a9c 100644
--- a/searchcore/src/vespa/searchcore/fdispatch/search/configdesc.cpp
+++ b/searchcore/src/vespa/searchcore/fdispatch/search/configdesc.cpp
@@ -1,12 +1,9 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-// Copyright (C) 1998-2003 Fast Search & Transfer ASA
-// Copyright (C) 2003 Overture Services Norway AS
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
+#include "configdesc.h"
#include <vespa/searchcore/util/log.h>
-#include <vespa/searchcore/fdispatch/search/configdesc.h>
+#include <vespa/log/log.h>
LOG_SETUP(".search.configdesc");
//----------------------------------------------------------------------
diff --git a/searchcore/src/vespa/searchcore/fdispatch/search/configdesc.h b/searchcore/src/vespa/searchcore/fdispatch/search/configdesc.h
index ea873d3ab30..9f2a65c2f91 100644
--- a/searchcore/src/vespa/searchcore/fdispatch/search/configdesc.h
+++ b/searchcore/src/vespa/searchcore/fdispatch/search/configdesc.h
@@ -1,12 +1,11 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-// Copyright (C) 1998-2003 Fast Search & Transfer ASA
-// Copyright (C) 2003 Overture Services Norway AS
#pragma once
#include <vespa/searchlib/common/fslimits.h>
#include <vespa/searchcore/fdispatch/common/stdincl.h>
#include <vespa/searchcore/config/config-partitions.h>
+#include <cassert>
using vespa::config::search::core::PartitionsConfig;
@@ -35,8 +34,7 @@ public:
_unitrefcost(1),
_isBad(false),
_confPartIDOverrides(false)
- {
- }
+ { }
void SetNext(FastS_EngineDesc *next) { _next = next; }
void SetConfPartID(int32_t value) { assert(value >= 0); _confPartID = value; }
diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp
index ffda6b07480..5152f0d0be6 100644
--- a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp
+++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp
@@ -16,6 +16,7 @@
#include <vespa/searchcore/proton/bucketdb/splitbucketsession.h>
#include <vespa/searchlib/util/bufferwriter.h>
#include <vespa/searchlib/common/rcuvector.hpp>
+#include <vespa/searchlib/query/queryterm.h>
#include <vespa/fastos/file.h>
@@ -622,8 +623,7 @@ DocumentMetaStore::move(DocId fromLid, DocId toLid)
}
void
-DocumentMetaStore::removeBatch(const std::vector<search::DocumentIdT> &lidsToRemove,
- const uint32_t docIdLimit)
+DocumentMetaStore::removeBatch(const std::vector<DocId> &lidsToRemove, const uint32_t docIdLimit)
{
for (const auto &lid : lidsToRemove) {
assert(lid > 0 && lid < docIdLimit);
@@ -750,7 +750,7 @@ DocumentMetaStore::createBlackListBlueprint() const
}
AttributeVector::SearchContext::UP
-DocumentMetaStore::getSearch(search::QueryTermSimple::UP qTerm, const AttributeVector::SearchContext::Params &) const
+DocumentMetaStore::getSearch(std::unique_ptr<search::QueryTermSimple> qTerm, const AttributeVector::SearchContext::Params &) const
{
return AttributeVector::SearchContext::UP
(new documentmetastore::SearchContext(std::move(qTerm), *this));
diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.h b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.h
index 389c4c7ec27..0b4272da7a9 100644
--- a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.h
+++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.h
@@ -212,7 +212,7 @@ public:
* Implements search::AttributeVector
*/
SearchContext::UP
- getSearch(search::QueryTermSimple::UP qTerm,
+ getSearch(std::unique_ptr<search::QueryTermSimple> qTerm,
const search::AttributeVector::SearchContext::Params & params)
const override;
diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp b/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp
index 0abec2b44ca..37735d42e8c 100644
--- a/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp
+++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.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 "lid_allocator.h"
-
+#include <vespa/searchlib/query/queryterm.h>
#include <vespa/log/log.h>
LOG_SETUP(".proton.documentmetastore.lid_allocator");
diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/search_context.cpp b/searchcore/src/vespa/searchcore/proton/documentmetastore/search_context.cpp
index 7e4f3067d4e..d03a5a14743 100644
--- a/searchcore/src/vespa/searchcore/proton/documentmetastore/search_context.cpp
+++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/search_context.cpp
@@ -1,11 +1,8 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
-LOG_SETUP(".proton.documentmetastore.search_context");
-
#include "search_context.h"
#include <vespa/searchlib/attribute/attributeiterators.h>
+#include <vespa/searchlib/query/queryterm.h>
#include <vespa/vespalib/util/exceptions.h>
using document::GlobalId;
diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/search_context.h b/searchcore/src/vespa/searchcore/proton/documentmetastore/search_context.h
index 6a2e6f2045e..570e299dd14 100644
--- a/searchcore/src/vespa/searchcore/proton/documentmetastore/search_context.h
+++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/search_context.h
@@ -20,18 +20,17 @@ private:
bool _isWord;
document::GlobalId _gid;
- virtual unsigned int approximateHits() const;
- virtual bool onCmp(DocId docId, int32_t &weight) const;
- virtual bool onCmp(DocId docId) const;
+ unsigned int approximateHits() const override;
+ bool onCmp(DocId docId, int32_t &weight) const override;
+ bool onCmp(DocId docId) const override;
- virtual search::queryeval::SearchIterator::UP
- createIterator(search::fef::TermFieldMatchData *matchData,
- bool strict);
+ search::queryeval::SearchIterator::UP
+ createIterator(search::fef::TermFieldMatchData *matchData, bool strict) override;
const DocumentMetaStore &getStore() const;
public:
- SearchContext(search::QueryTermSimple::UP qTerm,
+ SearchContext(std::unique_ptr<search::QueryTermSimple> qTerm,
const DocumentMetaStore &toBeSearched);
};
diff --git a/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp b/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp
index f52739cf17c..18cdc0f26b3 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp
@@ -9,8 +9,9 @@
#include <vespa/vespalib/util/closure.h>
#include <vespa/vespalib/util/thread_bundle.h>
#include <vespa/searchcore/grouping/groupingmanager.h>
-#include <vespa/log/log.h>
+#include <vespa/searchlib/common/bitvector.h>
+#include <vespa/log/log.h>
LOG_SETUP(".proton.matching.match_thread");
namespace proton {
@@ -18,7 +19,6 @@ namespace matching {
using search::queryeval::OptimizedAndNotForBlackListing;
using search::queryeval::SearchIterator;
-using search::fef::TermFieldHandle;
using search::fef::MatchData;
using search::fef::RankProgram;
using search::fef::FeatureResolver;
diff --git a/searchcore/src/vespa/searchcore/proton/matching/match_thread.h b/searchcore/src/vespa/searchcore/proton/matching/match_thread.h
index f0a8d2bc0c6..6e31e9fd99e 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/match_thread.h
+++ b/searchcore/src/vespa/searchcore/proton/matching/match_thread.h
@@ -2,11 +2,6 @@
#pragma once
-#include <vespa/vespalib/util/runnable.h>
-#include <vespa/vespalib/util/dual_merge_director.h>
-#include <vespa/searchlib/common/resultset.h>
-#include <vespa/searchlib/common/sortresults.h>
-#include <vespa/searchlib/queryeval/hitcollector.h>
#include "match_tools.h"
#include "i_match_loop_communicator.h"
#include "match_params.h"
@@ -14,6 +9,11 @@
#include "partial_result.h"
#include "result_processor.h"
#include "docid_range_scheduler.h"
+#include <vespa/vespalib/util/runnable.h>
+#include <vespa/vespalib/util/dual_merge_director.h>
+#include <vespa/searchlib/common/resultset.h>
+#include <vespa/searchlib/common/sortresults.h>
+#include <vespa/searchlib/queryeval/hitcollector.h>
namespace proton {
namespace matching {