blob: 57decbdbcd4eb63da6674e6bb2158ef82f088944 (
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
|
// 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;
/**
* Tests numeric terms
*
* @author bratseth
*/
public class StopwordTestCase extends RuleBaseAbstractTestCase {
public StopwordTestCase(String name) {
super(name,"stopwords.sr");
}
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")));
}
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")));
}
}
|