aboutsummaryrefslogtreecommitdiffstats
path: root/container-search/src/main/java/com/yahoo/prelude/semantics/engine/ParameterNameSpace.java
blob: 0789e20579dcb226c6e7b1f7991370e4deec4981 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.prelude.semantics.engine;

import com.yahoo.search.Query;

/**
 * A name space representing the (http) parameters following this query
 *
 * @author bratseth
 */
public class ParameterNameSpace extends NameSpace {

    public boolean matches(String term,RuleEvaluation e) {
        Query query=e.getEvaluation().getQuery();
        String value=query.properties().getString(term);
        if (value==null) return false;
        e.setValue(value);
        return true;
    }

}