aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/vespa/searchlib/queryeval/nns_index_iterator.h
blob: 84ff0f04813fcce3aba580f1cbd1f90df0691173 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include "searchiterator.h"
#include <vespa/searchlib/fef/termfieldmatchdata.h>
#include <vespa/searchlib/tensor/distance_function.h>
#include <vespa/searchlib/tensor/nearest_neighbor_index.h>

namespace search::queryeval {

class NnsIndexIterator : public SearchIterator
{
public:
    using Hit = search::tensor::NearestNeighborIndex::Neighbor;
    static std::unique_ptr<NnsIndexIterator> create(
            fef::TermFieldMatchData &tfmd,
            const std::vector<Hit> &hits,
            const search::tensor::BoundDistanceFunction &dist_fun);
};

} // namespace