aboutsummaryrefslogtreecommitdiffstats
path: root/searchsummary
diff options
context:
space:
mode:
authorArne Juul <arnej@verizonmedia.com>2020-07-09 12:24:49 +0000
committerArne Juul <arnej@verizonmedia.com>2020-07-09 12:24:49 +0000
commitc4e625a62bfc31d776a66576506404910dd51bba (patch)
treea3726e6d743d21ab5cede9abf0ed88e06668686e /searchsummary
parent69c84f46fae6c13b01b085738882e16bc7f11024 (diff)
remove even more unused code
Diffstat (limited to 'searchsummary')
-rw-r--r--searchsummary/src/tests/extractkeywords/simplequerystackitem.cpp12
-rw-r--r--searchsummary/src/tests/extractkeywords/simplequerystackitem.h49
2 files changed, 4 insertions, 57 deletions
diff --git a/searchsummary/src/tests/extractkeywords/simplequerystackitem.cpp b/searchsummary/src/tests/extractkeywords/simplequerystackitem.cpp
index 51076f6a3ad..5a4b6d76b8f 100644
--- a/searchsummary/src/tests/extractkeywords/simplequerystackitem.cpp
+++ b/searchsummary/src/tests/extractkeywords/simplequerystackitem.cpp
@@ -9,13 +9,10 @@ namespace search {
SimpleQueryStackItem::SimpleQueryStackItem()
: _next(NULL),
- _weight(100),
- _uniqueId(0),
_arg1(0),
_arg2(0),
_arg3(0),
_type(ITEM_UNDEF),
- _flags(0),
_arity(0),
_indexName(),
_term()
@@ -110,15 +107,6 @@ SimpleQueryStackItem::AppendBuffer(RawBuf *buf) const
// Put the values into the buffer.
buf->append(_type);
- if (Feature_Weight()) { // this item has weight
- buf->appendCompressedNumber(_weight.percent());
- }
- if (feature_UniqueId()) {
- buf->appendCompressedPositiveNumber(_uniqueId);
- }
- if (feature_Flags()) {
- buf->append(_flags);
- }
switch (Type()) {
case ITEM_OR:
case ITEM_EQUIV:
diff --git a/searchsummary/src/tests/extractkeywords/simplequerystackitem.h b/searchsummary/src/tests/extractkeywords/simplequerystackitem.h
index 810000b09a6..15d8f7e5938 100644
--- a/searchsummary/src/tests/extractkeywords/simplequerystackitem.h
+++ b/searchsummary/src/tests/extractkeywords/simplequerystackitem.h
@@ -29,51 +29,17 @@ public:
SimpleQueryStackItem *_next;
private:
- query::Weight _weight;
- uint32_t _uniqueId;
uint32_t _arg1;
double _arg2;
double _arg3;
- uint8_t _type;
- uint8_t _flags;
+ ItemType _type;
public:
- /** Extra information on each item (creator id) coded in bits 12-19 of _type */
- static inline ItemCreator GetCreator(uint8_t type) { return static_cast<ItemCreator>((type >> 3) & 0x01); }
- /** The old item type now uses only the lower 12 bits in a backward compatible way) */
- static inline ItemType GetType(uint8_t type) { return static_cast<ItemType>(type & 0x1F); }
- inline ItemType Type() const { return GetType(_type); }
-
- static inline bool GetFeature(uint8_t type, uint8_t feature)
- { return ((type & feature) != 0); }
-
- static inline bool GetFeature_Weight(uint8_t type)
- { return GetFeature(type, IF_WEIGHT); }
-
- static inline bool getFeature_UniqueId(uint8_t type)
- { return GetFeature(type, IF_UNIQUEID); }
-
- static inline bool getFeature_Flags(uint8_t type)
- { return GetFeature(type, IF_FLAGS); }
-
- inline bool Feature(uint8_t feature) const
- { return GetFeature(_type, feature); }
-
- inline bool Feature_Weight() const
- { return GetFeature_Weight(_type); }
-
- inline bool feature_UniqueId() const
- { return getFeature_UniqueId(_type); }
-
- inline bool feature_Flags() const
- { return getFeature_Flags(_type); }
-
- static inline bool getFlag(uint8_t flags, uint8_t flag)
- { return ((flags & flag) != 0); }
+ ItemType Type() const { return _type; }
/** The number of operands for the operation. */
uint32_t _arity;
- /** The name of the specified index, or NULL if no index. */
+ /** The name of the specified index, or empty if no index. */
vespalib::string _indexName;
/** The specified search term. */
vespalib::string _term;
@@ -128,17 +94,10 @@ public:
* @param type The new type.
*/
void SetType(ItemType type) {
- _type = (_type & ~0x1F) | type;
+ _type = type;
}
/**
- * Get the unique id for this item.
- *
- * @return unique id for this item
- **/
- uint32_t getUniqueId() const { return _uniqueId; }
-
- /**
* Encode the item in a binary buffer.
* @param buf Pointer to a buffer containing the encoded contents.
*/