aboutsummaryrefslogtreecommitdiffstats
path: root/container-search/src/test/java/com/yahoo/prelude/semantics/test/PhraseMatchTestCase.java
blob: fd9003e0e05ddc7ade5e5ce7c3df061219d8a812 (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
27
28
29
30
// 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.Ignore;
import org.junit.Test;

/**
 * Tests that the phrase produced by an automata match can subsequently be replaced by an AND of the
 * same terms.
 *
 * @author bratseth
 */
public class PhraseMatchTestCase extends RuleBaseAbstractTestCase {

    public PhraseMatchTestCase() {
        super("phrasematch.sr", "semantics.fsa");
    }

    @Test
    @Ignore // TODO: Work in progress
    public void testLiteralEquals() {
        assertSemantics("AND retailer:digital retailer:camera","keyword:digital keyword:camera");
    }

    @Test
    public void testMatchingPhrase() {
        assertSemantics("OR (AND iphone 7) i7", "iphone 7");
    }

}