blob: 22b24e1a0b014b399e6788beff2ce8993a30259f (
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.Test;
/**
* tersts the ellipsis rule base
*
* @author bratseth
*/
public class MatchAllTestCase extends RuleBaseAbstractTestCase {
public MatchAllTestCase() {
super("matchall.sr");
}
@Test
public 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
public 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");
}
}
|