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

#pragma once

#include "persistent_predicate_params.h"

namespace search::attribute {

/*
 * Parameters for predicate attributes.
 */
class PredicateParams : public PersistentPredicateParams
{
    float _dense_posting_list_threshold;
public:
    PredicateParams() noexcept
        : PersistentPredicateParams(),
          _dense_posting_list_threshold(0.4)
    { }

    float dense_posting_list_threshold() const noexcept { return _dense_posting_list_threshold; }
    void setDensePostingListThreshold(float v)  noexcept { _dense_posting_list_threshold = v; }
    bool operator==(const PredicateParams &rhs) const noexcept {
        return (PersistentPredicateParams::operator==(rhs) &&
                (_dense_posting_list_threshold == rhs._dense_posting_list_threshold));
    }
};

}