aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/vespa/searchlib/query/streaming/queryterm.h
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2024-01-03 10:03:12 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2024-01-05 08:29:15 +0000
commit192af4443cb572791c8f11520e8ebec4ee4e5a8e (patch)
tree755a603c0fe1b28116a24749f4f919ffee756c84 /searchlib/src/vespa/searchlib/query/streaming/queryterm.h
parentd8b50e4eaea708fed984c7c6ccdd06ac48b358bf (diff)
- Fold query for streaming search based on either query item type, or field definition.
- This ensures that query processing and document processing is symmetric for streaming search. No longer rely on java query processing being symmetric with backend c++ variant. - Indexed search does no normalization in backend and uses query as is.
Diffstat (limited to 'searchlib/src/vespa/searchlib/query/streaming/queryterm.h')
-rw-r--r--searchlib/src/vespa/searchlib/query/streaming/queryterm.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/searchlib/src/vespa/searchlib/query/streaming/queryterm.h b/searchlib/src/vespa/searchlib/query/streaming/queryterm.h
index 2d1156a9c51..743998a630e 100644
--- a/searchlib/src/vespa/searchlib/query/streaming/queryterm.h
+++ b/searchlib/src/vespa/searchlib/query/streaming/queryterm.h
@@ -31,9 +31,6 @@ public:
bool isFloat() const { return _enc & Float; }
bool isBase10Integer() const { return _enc & Base10Integer; }
bool isAscii7Bit() const { return _enc & Ascii7Bit; }
- void setBase10Integer(bool v) { if (v) _enc |= Base10Integer; else _enc &= ~Base10Integer; }
- void setAscii7Bit(bool v) { if (v) _enc |= Ascii7Bit; else _enc &= ~Ascii7Bit; }
- void setFloat(bool v) { if (v) _enc |= Float; else _enc &= ~Float; }
private:
enum { Ascii7Bit=0x01, Base10Integer=0x02, Float=0x04 };
uint8_t _enc;
@@ -54,7 +51,12 @@ public:
uint32_t _hitCount;
uint32_t _fieldLength;
};
- QueryTerm(std::unique_ptr<QueryNodeResultBase> resultBase, const string & term, const string & index, Type type);
+ QueryTerm(std::unique_ptr<QueryNodeResultBase> resultBase, stringref term, const string & index, Type type)
+ : QueryTerm(std::move(resultBase), term, index, type, (type == Type::EXACTSTRINGTERM)
+ ? Normalizing::LOWERCASE
+ : Normalizing::LOWERCASE_AND_FOLD)
+ {}
+ QueryTerm(std::unique_ptr<QueryNodeResultBase> resultBase, stringref term, const string & index, Type type, Normalizing normalizing);
QueryTerm(const QueryTerm &) = delete;
QueryTerm & operator = (const QueryTerm &) = delete;
QueryTerm(QueryTerm &&) = delete;