blob: 35427250511a7971ea065c79ac5ddb2c479f5fb8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
// Copyright 2016 Yahoo Inc. 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 <a href="mailto:bratseth@yahoo-inc.com">Jon Bratseth</a>
*/
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;
}
}
|