summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@online.no>2023-11-30 12:33:06 +0100
committerTor Egge <Tor.Egge@online.no>2023-11-30 12:33:06 +0100
commitc720e5e0fd0602099432d9f950ccc83fcc4d831c (patch)
tree8ed0a2900dde009aed3267e26dd14b19c61f5a37
parent690f060bf5b5b5a22d747ecd5c8a66179dd4bd58 (diff)
Standard plural of leaf is leaves.
-rw-r--r--searchlib/src/tests/query/streaming_query_large_test.cpp2
-rw-r--r--searchlib/src/tests/query/streaming_query_test.cpp10
-rw-r--r--searchlib/src/vespa/searchlib/query/streaming/query.cpp16
-rw-r--r--searchlib/src/vespa/searchlib/query/streaming/query.h8
-rw-r--r--searchlib/src/vespa/searchlib/query/streaming/querynode.h4
-rw-r--r--searchlib/src/vespa/searchlib/query/streaming/queryterm.cpp4
-rw-r--r--searchlib/src/vespa/searchlib/query/streaming/queryterm.h4
-rw-r--r--streamingvisitors/src/tests/querywrapper/querywrapper_test.cpp2
-rw-r--r--streamingvisitors/src/vespa/searchvisitor/querywrapper.cpp10
-rw-r--r--streamingvisitors/src/vespa/searchvisitor/searchvisitor.cpp2
-rw-r--r--streamingvisitors/src/vespa/vsm/searcher/fieldsearcher.cpp2
-rw-r--r--streamingvisitors/src/vespa/vsm/vsm/fieldsearchspec.cpp4
12 files changed, 34 insertions, 34 deletions
diff --git a/searchlib/src/tests/query/streaming_query_large_test.cpp b/searchlib/src/tests/query/streaming_query_large_test.cpp
index f55042e93cb..678580ac811 100644
--- a/searchlib/src/tests/query/streaming_query_large_test.cpp
+++ b/searchlib/src/tests/query/streaming_query_large_test.cpp
@@ -50,7 +50,7 @@ TEST("testveryLongQueryResultingInBug6850778") {
Query q(factory, stackDump);
QueryTermList terms;
QueryNodeRefList phrases;
- q.getLeafs(terms);
+ q.getLeaves(terms);
ASSERT_EQUAL(NUMITEMS + 2, terms.size());
}
diff --git a/searchlib/src/tests/query/streaming_query_test.cpp b/searchlib/src/tests/query/streaming_query_test.cpp
index 71de57dbde3..ffd8c21d561 100644
--- a/searchlib/src/tests/query/streaming_query_test.cpp
+++ b/searchlib/src/tests/query/streaming_query_test.cpp
@@ -378,13 +378,13 @@ TEST("testGetQueryParts") {
Query q(empty, stackDump);
QueryTermList terms;
QueryNodeRefList phrases;
- q.getLeafs(terms);
+ q.getLeaves(terms);
q.getPhrases(phrases);
ASSERT_TRUE(terms.size() == 7);
ASSERT_TRUE(phrases.size() == 2);
{
QueryTermList pts;
- phrases[0]->getLeafs(pts);
+ phrases[0]->getLeaves(pts);
ASSERT_TRUE(pts.size() == 3);
for (size_t i = 0; i < 3; ++i) {
EXPECT_EQUAL(pts[i], terms[i + 1]);
@@ -392,7 +392,7 @@ TEST("testGetQueryParts") {
}
{
QueryTermList pts;
- phrases[1]->getLeafs(pts);
+ phrases[1]->getLeaves(pts);
ASSERT_TRUE(pts.size() == 2);
for (size_t i = 0; i < 2; ++i) {
EXPECT_EQUAL(pts[i], terms[i + 5]);
@@ -415,7 +415,7 @@ TEST("testPhraseEvaluate") {
QueryNodeRefList phrases;
q.getPhrases(phrases);
QueryTermList terms;
- q.getLeafs(terms);
+ q.getLeaves(terms);
for (QueryTerm * qt : terms) {
qt->resizeFieldId(1);
}
@@ -754,7 +754,7 @@ TEST("testSameElementEvaluate") {
verifyQueryTermNode("field.f3", (*sameElem)[2].get());
QueryTermList terms;
- q.getLeafs(terms);
+ q.getLeaves(terms);
EXPECT_EQUAL(3u, terms.size());
for (QueryTerm * qt : terms) {
qt->resizeFieldId(3);
diff --git a/searchlib/src/vespa/searchlib/query/streaming/query.cpp b/searchlib/src/vespa/searchlib/query/streaming/query.cpp
index 8e77f11709c..d1ab5ea24d6 100644
--- a/searchlib/src/vespa/searchlib/query/streaming/query.cpp
+++ b/searchlib/src/vespa/searchlib/query/streaming/query.cpp
@@ -45,18 +45,18 @@ QueryConnector::reset()
}
void
-QueryConnector::getLeafs(QueryTermList & tl)
+QueryConnector::getLeaves(QueryTermList & tl)
{
for (const auto & node : _children) {
- node->getLeafs(tl);
+ node->getLeaves(tl);
}
}
void
-QueryConnector::getLeafs(ConstQueryTermList & tl) const
+QueryConnector::getLeaves(ConstQueryTermList & tl) const
{
for (const auto & node : _children) {
- node->getLeafs(tl);
+ node->getLeaves(tl);
}
}
@@ -355,16 +355,16 @@ Query::build(const QueryNodeResultFactory & factory, vespalib::stringref queryRe
}
void
-Query::getLeafs(QueryTermList & tl) {
+Query::getLeaves(QueryTermList & tl) {
if (valid()) {
- _root->getLeafs(tl);
+ _root->getLeaves(tl);
}
}
void
-Query::getLeafs(ConstQueryTermList & tl) const {
+Query::getLeaves(ConstQueryTermList & tl) const {
if (valid()) {
- _root->getLeafs(tl);
+ _root->getLeaves(tl);
}
}
diff --git a/searchlib/src/vespa/searchlib/query/streaming/query.h b/searchlib/src/vespa/searchlib/query/streaming/query.h
index dcb66467247..42c3b94002c 100644
--- a/searchlib/src/vespa/searchlib/query/streaming/query.h
+++ b/searchlib/src/vespa/searchlib/query/streaming/query.h
@@ -17,8 +17,8 @@ public:
~QueryConnector();
const HitList & evaluateHits(HitList & hl) const override;
void reset() override;
- void getLeafs(QueryTermList & tl) override;
- void getLeafs(ConstQueryTermList & tl) const override;
+ void getLeaves(QueryTermList & tl) override;
+ void getLeaves(ConstQueryTermList & tl) const override;
void getPhrases(QueryNodeRefList & tl) override;
void getPhrases(ConstQueryNodeRefList & tl) const override;
size_t depth() const override;
@@ -192,8 +192,8 @@ public:
/// Will clear the results from the querytree.
void reset();
/// Will get all leafnodes.
- void getLeafs(QueryTermList & tl);
- void getLeafs(ConstQueryTermList & tl) const;
+ void getLeaves(QueryTermList & tl);
+ void getLeaves(ConstQueryTermList & tl) const;
/// Gives you all phrases of this tree.
void getPhrases(QueryNodeRefList & tl);
void getPhrases(ConstQueryNodeRefList & tl) const;
diff --git a/searchlib/src/vespa/searchlib/query/streaming/querynode.h b/searchlib/src/vespa/searchlib/query/streaming/querynode.h
index fe876ac55d2..36abc2f7db5 100644
--- a/searchlib/src/vespa/searchlib/query/streaming/querynode.h
+++ b/searchlib/src/vespa/searchlib/query/streaming/querynode.h
@@ -41,9 +41,9 @@ class QueryNode
/// Clears all the hitlists so the query tree can be reused.
virtual void reset() = 0;
/// Gives you all leafs of this tree.
- virtual void getLeafs(QueryTermList & tl) = 0;
+ virtual void getLeaves(QueryTermList & tl) = 0;
/// Gives you all leafs of this tree. Indicating that they are all const.
- virtual void getLeafs(ConstQueryTermList & tl) const = 0;
+ virtual void getLeaves(ConstQueryTermList & tl) const = 0;
/// Gives you all phrases of this tree.
virtual void getPhrases(QueryNodeRefList & tl) = 0;
/// Gives you all phrases of this tree. Indicating that they are all const.
diff --git a/searchlib/src/vespa/searchlib/query/streaming/queryterm.cpp b/searchlib/src/vespa/searchlib/query/streaming/queryterm.cpp
index ed526752b20..82f2c2906e0 100644
--- a/searchlib/src/vespa/searchlib/query/streaming/queryterm.cpp
+++ b/searchlib/src/vespa/searchlib/query/streaming/queryterm.cpp
@@ -74,8 +74,8 @@ QueryTerm::QueryTerm(std::unique_ptr<QueryNodeResultBase> org, const string & te
void QueryTerm::getPhrases(QueryNodeRefList & tl) { (void) tl; }
void QueryTerm::getPhrases(ConstQueryNodeRefList & tl) const { (void) tl; }
-void QueryTerm::getLeafs(QueryTermList & tl) { tl.push_back(this); }
-void QueryTerm::getLeafs(ConstQueryTermList & tl) const { tl.push_back(this); }
+void QueryTerm::getLeaves(QueryTermList & tl) { tl.push_back(this); }
+void QueryTerm::getLeaves(ConstQueryTermList & tl) const { tl.push_back(this); }
bool QueryTerm::evaluate() const { return !_hitList.empty(); }
void QueryTerm::reset() { _hitList.clear(); }
const HitList & QueryTerm::evaluateHits(HitList &) const { return _hitList; }
diff --git a/searchlib/src/vespa/searchlib/query/streaming/queryterm.h b/searchlib/src/vespa/searchlib/query/streaming/queryterm.h
index 9b9a429d5f5..96d83982cbb 100644
--- a/searchlib/src/vespa/searchlib/query/streaming/queryterm.h
+++ b/searchlib/src/vespa/searchlib/query/streaming/queryterm.h
@@ -62,8 +62,8 @@ public:
bool evaluate() const override;
const HitList & evaluateHits(HitList & hl) const override;
void reset() override;
- void getLeafs(QueryTermList & tl) override;
- void getLeafs(ConstQueryTermList & tl) const override;
+ void getLeaves(QueryTermList & tl) override;
+ void getLeaves(ConstQueryTermList & tl) const override;
/// Gives you all phrases of this tree.
void getPhrases(QueryNodeRefList & tl) override;
/// Gives you all phrases of this tree. Indicating that they are all const.
diff --git a/streamingvisitors/src/tests/querywrapper/querywrapper_test.cpp b/streamingvisitors/src/tests/querywrapper/querywrapper_test.cpp
index 1ee6403c577..dc3dbfca7ca 100644
--- a/streamingvisitors/src/tests/querywrapper/querywrapper_test.cpp
+++ b/streamingvisitors/src/tests/querywrapper/querywrapper_test.cpp
@@ -47,7 +47,7 @@ QueryWrapperTest::testQueryWrapper()
QueryWrapper::TermList & tl = wrap.getTermList();
QueryTermList terms;
- q.getLeafs(terms);
+ q.getLeaves(terms);
ASSERT_TRUE(tl.size() == 5 && terms.size() == 5);
for (size_t i = 0; i < 5; ++i) {
EXPECT_EQUAL(tl[i].getTerm(), terms[i]);
diff --git a/streamingvisitors/src/vespa/searchvisitor/querywrapper.cpp b/streamingvisitors/src/vespa/searchvisitor/querywrapper.cpp
index dddb6d28d48..c1311a80c7a 100644
--- a/streamingvisitors/src/vespa/searchvisitor/querywrapper.cpp
+++ b/streamingvisitors/src/vespa/searchvisitor/querywrapper.cpp
@@ -34,12 +34,12 @@ QueryWrapper::QueryWrapper(Query & query) :
_phraseList(query),
_termList()
{
- QueryTermList leafs;
- query.getLeafs(leafs);
- for (size_t i = 0; i < leafs.size(); ++i) {
+ QueryTermList leaves;
+ query.getLeaves(leaves);
+ for (size_t i = 0; i < leaves.size(); ++i) {
size_t index = 0;
- PhraseQueryNode * parent = _phraseList.findPhrase(leafs[i], index);
- _termList.push_back(Term(leafs[i], parent, index));
+ PhraseQueryNode * parent = _phraseList.findPhrase(leaves[i], index);
+ _termList.push_back(Term(leaves[i], parent, index));
}
}
diff --git a/streamingvisitors/src/vespa/searchvisitor/searchvisitor.cpp b/streamingvisitors/src/vespa/searchvisitor/searchvisitor.cpp
index ee091354a30..4d31c71c0a0 100644
--- a/streamingvisitors/src/vespa/searchvisitor/searchvisitor.cpp
+++ b/streamingvisitors/src/vespa/searchvisitor/searchvisitor.cpp
@@ -781,7 +781,7 @@ void
SearchVisitor::setupSnippetModifiers()
{
QueryTermList qtl;
- _query.getLeafs(qtl);
+ _query.getLeaves(qtl);
_snippetModifierManager.setup(qtl, _fieldSearchSpecMap.specMap(), _fieldSearchSpecMap.documentTypeMap().begin()->second,
*_fieldPathMap, _rankController.getRankProcessor()->get_query_env());
}
diff --git a/streamingvisitors/src/vespa/vsm/searcher/fieldsearcher.cpp b/streamingvisitors/src/vespa/vsm/searcher/fieldsearcher.cpp
index e70655a4d07..c11f9e839cf 100644
--- a/streamingvisitors/src/vespa/vsm/searcher/fieldsearcher.cpp
+++ b/streamingvisitors/src/vespa/vsm/searcher/fieldsearcher.cpp
@@ -226,7 +226,7 @@ void FieldIdTSearcherMap::prepare(const DocumentTypeIndexFieldMapT& difm,
search::fef::IQueryEnvironment& query_env)
{
QueryTermList qtl;
- query.getLeafs(qtl);
+ query.getLeaves(qtl);
vespalib::string tmp;
for (auto& searcher : *this) {
QueryTermList onlyInIndex;
diff --git a/streamingvisitors/src/vespa/vsm/vsm/fieldsearchspec.cpp b/streamingvisitors/src/vespa/vsm/vsm/fieldsearchspec.cpp
index fdde633bd91..e33408a2e26 100644
--- a/streamingvisitors/src/vespa/vsm/vsm/fieldsearchspec.cpp
+++ b/streamingvisitors/src/vespa/vsm/vsm/fieldsearchspec.cpp
@@ -186,7 +186,7 @@ bool FieldSearchSpecMap::buildFieldsInQuery(const Query & query, StringFieldIdTM
{
bool retval(true);
ConstQueryTermList qtl;
- query.getLeafs(qtl);
+ query.getLeaves(qtl);
for (const auto & term : qtl) {
for (const auto & dtm : documentTypeMap()) {
@@ -282,7 +282,7 @@ void
FieldSearchSpecMap::reconfigFromQuery(const Query & query)
{
ConstQueryTermList qtl;
- query.getLeafs(qtl);
+ query.getLeaves(qtl);
for (const auto & termA : qtl) {
for (const auto & ifm : documentTypeMap()) {