aboutsummaryrefslogtreecommitdiffstats
path: root/container-search/src/test/java/com/yahoo/prelude/semantics/test/PhraseMatchTestCase.java
blob: 9536c1bfb7c3778fe199718a296987c1a92a8c8f (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
31
// 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.Disabled;
import org.junit.jupiter.api.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");
    }

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

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

}