aboutsummaryrefslogtreecommitdiffstats
path: root/container-search/src/test/java/com/yahoo/prelude/semantics/test/WeightingTestCase.java
blob: e5d7408f3c01ff8a7c4c15d98c794a9e4f250506 (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
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.prelude.semantics.test;

import org.junit.jupiter.api.Test;

/**
 * @author bratseth
 */
public class WeightingTestCase extends RuleBaseAbstractTestCase {

    public WeightingTestCase() {
        super("weighting.sr");
    }

    @Test
    void testWeighting() {
        assertSemantics("foo!150", "foo");
        assertSemantics("AND foo!150 snip", "foo snip");
        assertSemantics("AND foo!150 bar", "foo bar");
        assertSemantics("AND bar!57 foo!150", "bar foo");
        assertSemantics("AND foo!150 fu", "foo fu");
        assertSemantics("AND foo!150 bar kanoo boat!237", "foo bar kanoo");
    }

}