blob: d2d87dccf3311d36b054665aa8aeaed163afb0c8 (
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 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.prelude.semantics.test;
import com.yahoo.search.Query;
import com.yahoo.search.test.QueryTestCase;
import org.junit.Test;
/**
* Tests numeric terms
*
* @author bratseth
*/
public class StopwordTestCase extends RuleBaseAbstractTestCase {
public StopwordTestCase() {
super("stopwords.sr");
}
@Test
public void testStopwords() {
assertSemantics("AND mlr:ve mlr:heard mlr:beautiful mlr:world",
new Query(QueryTestCase.httpEncode("?query=i don't know if you've heard, but it's a beautiful world&default-index=mlr&tracelevel.rules=0")));
}
@Test
public void testStopwordsInPhrase() {
assertSemantics("AND mlr:\"ve heard\" mlr:beautiful mlr:world",
new Query(QueryTestCase.httpEncode("?query=\"i don't know if you've heard\", but it's a beautiful world&default-index=mlr&tracelevel.rules=0")));
}
}
|