blob: ab2ea4758c36a0d2c95f860d41c6ce74ddecc6f7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include "search_context.h"
namespace search::attribute {
/*
* NumericSearchContext is an abstract base class for search contexts
* handling a query term on a numeric attribute vector.
*/
template <typename Matcher>
class NumericSearchContext : public SearchContext, public Matcher
{
protected:
using MatcherType = Matcher;
public:
NumericSearchContext(const AttributeVector& to_be_searched, const QueryTermSimple& query_term, bool avoid_undefined_range);
NumericSearchContext(const AttributeVector& to_be_searched, Matcher&& matcher);
Int64Range getAsIntegerTerm() const override;
DoubleRange getAsDoubleTerm() const override;
bool valid() const override;
};
}
|