aboutsummaryrefslogtreecommitdiffstats
path: root/container-search/src/test/java/com/yahoo/prelude/semantics/test/OrPhraseTestCase.java
blob: 1d6eea8d7def91db7faaee0fcc8f1318d754a970 (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
// 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.Test;

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

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

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

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

}