blob: 8083ebcf2b33e19496bfe3004f3f08e8298bdc7e (
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
27
28
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <vespa/eval/eval/value_type.h>
#include <memory>
namespace search::attribute { class HnswIndexParams; }
namespace search::tensor {
class DocVectorAccess;
class NearestNeighborIndex;
/**
* Factory interface used to instantiate an index used for (approximate) nearest neighbor search.
*/
class NearestNeighborIndexFactory {
public:
virtual ~NearestNeighborIndexFactory() {}
virtual std::unique_ptr<NearestNeighborIndex> make(const DocVectorAccess& vectors,
size_t vector_size,
bool multi_vector_index,
vespalib::eval::CellType cell_type,
const search::attribute::HnswIndexParams& params) const = 0;
};
}
|