summaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2024-02-06 14:31:00 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2024-02-06 14:31:00 +0000
commitdb34a389edc985de037a3c456183a4dbc22f9c0a (patch)
treed41750216da199ce52ca61187462d68ef9f4dacb /searchlib
parent5f4768fa9095999f73d2f222e66cc81cee5fc456 (diff)
Empty index => 'default' index
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/vespa/searchlib/parsequery/stackdumpiterator.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/parsequery/stackdumpiterator.h2
-rw-r--r--searchlib/src/vespa/searchlib/query/streaming/querynode.cpp3
3 files changed, 5 insertions, 2 deletions
diff --git a/searchlib/src/vespa/searchlib/parsequery/stackdumpiterator.cpp b/searchlib/src/vespa/searchlib/parsequery/stackdumpiterator.cpp
index 596ad53c014..77cf20e4c10 100644
--- a/searchlib/src/vespa/searchlib/parsequery/stackdumpiterator.cpp
+++ b/searchlib/src/vespa/searchlib/parsequery/stackdumpiterator.cpp
@@ -14,6 +14,8 @@ using search::query::StringTermVector;
namespace search {
+vespalib::stringref SimpleQueryStackDumpIterator::DEFAULT_INDEX = "default";
+
SimpleQueryStackDumpIterator::SimpleQueryStackDumpIterator(vespalib::stringref buf)
: _buf(buf.begin()),
_bufEnd(buf.end()),
diff --git a/searchlib/src/vespa/searchlib/parsequery/stackdumpiterator.h b/searchlib/src/vespa/searchlib/parsequery/stackdumpiterator.h
index e04f6379434..0f80661bf38 100644
--- a/searchlib/src/vespa/searchlib/parsequery/stackdumpiterator.h
+++ b/searchlib/src/vespa/searchlib/parsequery/stackdumpiterator.h
@@ -137,6 +137,8 @@ public:
vespalib::stringref getIndexName() const { return _curr_index_name; }
vespalib::stringref getTerm() const { return _curr_term; }
int64_t getIntergerTerm() const { return _curr_integer_term; }
+
+ static vespalib::stringref DEFAULT_INDEX;
};
}
diff --git a/searchlib/src/vespa/searchlib/query/streaming/querynode.cpp b/searchlib/src/vespa/searchlib/query/streaming/querynode.cpp
index 44df253a2fd..d1f894063f8 100644
--- a/searchlib/src/vespa/searchlib/query/streaming/querynode.cpp
+++ b/searchlib/src/vespa/searchlib/query/streaming/querynode.cpp
@@ -21,7 +21,6 @@ namespace search::streaming {
namespace {
-vespalib::stringref DEFAULT("default");
bool disableRewrite(const QueryNode * qn) {
return dynamic_cast<const NearQueryNode *> (qn) ||
dynamic_cast<const PhraseQueryNode *> (qn) ||
@@ -105,7 +104,7 @@ QueryNode::Build(const QueryNode * parent, const QueryNodeResultFactory & factor
if ((type == ParseItem::ITEM_PURE_WEIGHTED_STRING) || (type == ParseItem::ITEM_PURE_WEIGHTED_LONG)) {
index = parent->getIndex();
} else {
- index = DEFAULT;
+ index = SimpleQueryStackDumpIterator::DEFAULT_INDEX;
}
}
if (dynamic_cast<const SameElementQueryNode *>(parent) != nullptr) {