blob: 37d614a26d1e08735613e2dc59d9ed7e15798c13 (
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
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <vespa/vespalib/stllike/string.h>
namespace search::features {
/**
* Utility for parsing a string representation of a weighted set
* that is typically passed down with the query.
*
* The format of the weighted set is as follows:
* {key1:weight1,key2:weight2,...,keyN:weightN}.
*/
class WeightedSetParser
{
public:
template <typename OutputType>
static void parse(const vespalib::string &input, OutputType &output);
};
}
|