blob: 270c2789ec53d82ab9f96bd432ef0ed4121b87dd (
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.Test;
/**
* tersts the ellipsis rule base
*
* @author bratseth
*/
public class MatchAllTestCase extends RuleBaseAbstractTestCase {
public MatchAllTestCase() {
super("matchall.sr");
}
@Test
void testMatchAll() {
assertSemantics("RANK a normtitle:a", "a");
assertSemantics("RANK (AND a b) normtitle:\"a b\"", "a b");
assertSemantics("RANK (AND a a b a) normtitle:\"a a b a\"", "a a b a");
}
@Test
void testMatchAllFilterIsIgnored() {
assertSemantics("RANK a |b normtitle:a", "a&filter=b");
assertSemantics("RANK (AND a b) |b |c normtitle:\"a b\"", "a b&filter=b c");
assertSemantics("RANK (AND a a b a) |a |a |c |d |b normtitle:\"a a b a\"", "a a b a&filter=a a c d b");
}
}
|