aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/vespa/searchlib/attribute/single_numeric_enum_search_context.h
blob: 3dcce2d2459ad543691e91ee0e7452cc93a80956 (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
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include "single_enum_search_context.h"
#include "numeric_range_matcher.h"
#include "numeric_search_context.h"

namespace search::attribute {

/*
 * SingleNumericEnumSearchContext handles the creation of search iterators for
 * a query term on a single value numeric enumerated attribute vector.
 */
template <typename T>
class SingleNumericEnumSearchContext : public SingleEnumSearchContext<T, NumericSearchContext<NumericRangeMatcher<T>>>
{
public:
    using AtomicEntryRef = vespalib::datastore::AtomicEntryRef;
    using EnumIndices = vespalib::ConstArrayRef<AtomicEntryRef>;
    SingleNumericEnumSearchContext(std::unique_ptr<QueryTermSimple> qTerm, const AttributeVector& toBeSearched, EnumIndices enum_indices, const EnumStoreT<T>& enum_store);
};

}