aboutsummaryrefslogtreecommitdiffstats
path: root/searchsummary
diff options
context:
space:
mode:
authorArne Juul <arnej@verizonmedia.com>2020-07-09 10:02:08 +0000
committerArne Juul <arnej@verizonmedia.com>2020-07-09 10:10:08 +0000
commit69c84f46fae6c13b01b085738882e16bc7f11024 (patch)
treeb95ae2f245c41c1c963a9f680cebf2933ea5d898 /searchsummary
parent88099bec32481b83b41f3966c2a88ebf4034f1fe (diff)
GC unused code
Diffstat (limited to 'searchsummary')
-rw-r--r--searchsummary/src/tests/docsummary/positionsdfw_test.cpp1
-rw-r--r--searchsummary/src/tests/extractkeywords/extractkeywordstest.cpp1
-rw-r--r--searchsummary/src/tests/extractkeywords/simplequerystack.cpp16
-rw-r--r--searchsummary/src/tests/extractkeywords/simplequerystack.h22
-rw-r--r--searchsummary/src/tests/extractkeywords/simplequerystackitem.cpp2
-rw-r--r--searchsummary/src/tests/extractkeywords/simplequerystackitem.h5
6 files changed, 3 insertions, 44 deletions
diff --git a/searchsummary/src/tests/docsummary/positionsdfw_test.cpp b/searchsummary/src/tests/docsummary/positionsdfw_test.cpp
index f54b4c19dc3..6fd0c39f06f 100644
--- a/searchsummary/src/tests/docsummary/positionsdfw_test.cpp
+++ b/searchsummary/src/tests/docsummary/positionsdfw_test.cpp
@@ -16,7 +16,6 @@
#include <vespa/log/log.h>
LOG_SETUP("positionsdfw_test");
-using search::RawBuf;
using search::IAttributeManager;
using search::MatchingElements;
using search::SingleInt64ExtAttribute;
diff --git a/searchsummary/src/tests/extractkeywords/extractkeywordstest.cpp b/searchsummary/src/tests/extractkeywords/extractkeywordstest.cpp
index 017ac0b075d..87317234a27 100644
--- a/searchsummary/src/tests/extractkeywords/extractkeywordstest.cpp
+++ b/searchsummary/src/tests/extractkeywords/extractkeywordstest.cpp
@@ -178,6 +178,7 @@ ExtractKeywordsTest::RunTest(int testno, bool verify)
case 1:
{
+ // check that skipping these works also:
stack.Push(new search::SimpleQueryStackItem(search::ParseItem::ITEM_LOCATION_TERM, "no"));
stack.Push(new search::SimpleQueryStackItem(search::ParseItem::ITEM_NEAREST_NEIGHBOR, "no"));
// multi term query
diff --git a/searchsummary/src/tests/extractkeywords/simplequerystack.cpp b/searchsummary/src/tests/extractkeywords/simplequerystack.cpp
index 40948612858..8c85417c79a 100644
--- a/searchsummary/src/tests/extractkeywords/simplequerystack.cpp
+++ b/searchsummary/src/tests/extractkeywords/simplequerystack.cpp
@@ -2,19 +2,14 @@
#include "simplequerystack.h"
#include <vespa/vespalib/util/compress.h>
-#include <vespa/vespalib/objects/nbo.h>
-#include <vespa/vespalib/util/stringfmt.h>
#include <vespa/log/log.h>
LOG_SETUP(".search.simplequerystack");
-using vespalib::make_string;
-
namespace search {
SimpleQueryStack::SimpleQueryStack()
- : _numItems(0),
- _stack(nullptr)
+ : _stack(nullptr)
{
}
@@ -28,8 +23,6 @@ SimpleQueryStack::Push(SimpleQueryStackItem *item)
{
item->_next = _stack;
_stack = item;
-
- _numItems++;
}
void
@@ -40,11 +33,4 @@ SimpleQueryStack::AppendBuffer(RawBuf *buf) const
}
}
-
-uint32_t
-SimpleQueryStack::GetSize()
-{
- return _numItems;
-}
-
} // namespace search
diff --git a/searchsummary/src/tests/extractkeywords/simplequerystack.h b/searchsummary/src/tests/extractkeywords/simplequerystack.h
index 97dd6418e48..7347c66c925 100644
--- a/searchsummary/src/tests/extractkeywords/simplequerystack.h
+++ b/searchsummary/src/tests/extractkeywords/simplequerystack.h
@@ -18,13 +18,7 @@ namespace search {
class SimpleQueryStack
{
private:
- /** The number of items on the stack. */
- uint32_t _numItems;
-
- /** The top of the stack.
- * Warning: FastQT_ProximityEmul currently assumes this is the head
- * of a singly linked list (linked with _next).
- */
+ /** The top of the stack. */
SimpleQueryStackItem *_stack;
public:
@@ -44,25 +38,11 @@ public:
*/
void Push(SimpleQueryStackItem *item);
-
/**
* Encode the contents of the stack in a binary buffer.
* @param buf Pointer to a buffer containing the encoded contents.
*/
void AppendBuffer(RawBuf *buf) const;
-
- /**
- * Return the number of items on the stack.
- * @return The number of items on the stack.
- */
- uint32_t GetSize();
- /**
- * Set the number of items on the stack.
- * This can be used by QTs that change the stack
- * under the hood. Use with care!
- * @param numItems The number of items on the stack.
- */
- void SetSize(uint32_t numItems) { _numItems = numItems; }
};
} // namespace search
diff --git a/searchsummary/src/tests/extractkeywords/simplequerystackitem.cpp b/searchsummary/src/tests/extractkeywords/simplequerystackitem.cpp
index f717cfced64..51076f6a3ad 100644
--- a/searchsummary/src/tests/extractkeywords/simplequerystackitem.cpp
+++ b/searchsummary/src/tests/extractkeywords/simplequerystackitem.cpp
@@ -9,7 +9,6 @@ namespace search {
SimpleQueryStackItem::SimpleQueryStackItem()
: _next(NULL),
- _sibling(NULL),
_weight(100),
_uniqueId(0),
_arg1(0),
@@ -99,7 +98,6 @@ SimpleQueryStackItem::SimpleQueryStackItem(ItemType type, const char *term) : Si
SimpleQueryStackItem::~SimpleQueryStackItem()
{
delete _next;
- delete _sibling;
}
void
diff --git a/searchsummary/src/tests/extractkeywords/simplequerystackitem.h b/searchsummary/src/tests/extractkeywords/simplequerystackitem.h
index 05250154d18..810000b09a6 100644
--- a/searchsummary/src/tests/extractkeywords/simplequerystackitem.h
+++ b/searchsummary/src/tests/extractkeywords/simplequerystackitem.h
@@ -17,9 +17,6 @@ namespace search {
* to the different query stack execution operations. It also
* provides an arity, and the string values indexName and term, to
* accomodate the different needs of the operations.
- * It also includes a mechanism for making singly linked lists
- * with sub-lists. This is used during the parsing, and also
- * when constructing the simple query stack.
*/
class SimpleQueryStackItem : public ParseItem
{
@@ -30,8 +27,6 @@ private:
public:
/** Pointer to next item in a linked list. */
SimpleQueryStackItem *_next;
- /** Pointer to first item in a sublist. */
- SimpleQueryStackItem *_sibling;
private:
query::Weight _weight;