summaryrefslogtreecommitdiffstats
path: root/container-search/src/test/java/com/yahoo/prelude/semantics/test/OrPhraseTestCase.java
blob: 3a2a7e0af51095f5e95174c00f873e0e329bd8cd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.prelude.semantics.test;

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

    public OrPhraseTestCase(String name) {
        super(name,"orphrase.sr");
    }

    public void testReplacing1() {
        assertSemantics("OR (AND new york) title:\"software engineer\"","software engineer new york");
        assertSemantics("title:\"software engineer\"","software engineer"); // Skip or when there is nothing else
    }

    public void testReplacing2() {
        assertSemantics("OR lotr \"lord of the rings\"","lotr");
    }

}