mirror of https://github.com/apache/lucene.git
- Added testQueryFilter test for bug 20290
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20290 - Made search(Query) private. git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150031 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bdcea5f2ed
commit
355e66eb34
|
@ -101,7 +101,7 @@ public class TestRemoteSearchable extends TestCase {
|
|||
Naming.rebind("//localhost/Searchable", impl);
|
||||
}
|
||||
|
||||
public static void search(Query query) throws Exception {
|
||||
private static void search(Query query) throws Exception {
|
||||
// try to search the published index
|
||||
Searchable[] searchables = { getRemote() };
|
||||
Searcher searcher = new MultiSearcher(searchables);
|
||||
|
@ -128,4 +128,17 @@ public class TestRemoteSearchable extends TestCase {
|
|||
search(query);
|
||||
}
|
||||
|
||||
// Tests bug fix at http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20290
|
||||
public void testQueryFilter() throws Exception {
|
||||
// try to search the published index
|
||||
Searchable[] searchables = { getRemote() };
|
||||
Searcher searcher = new MultiSearcher(searchables);
|
||||
Hits hits = searcher.search(
|
||||
new TermQuery(new Term("test", "text")),
|
||||
new QueryFilter(new TermQuery(new Term("test", "test"))));
|
||||
Hits nohits = searcher.search(
|
||||
new TermQuery(new Term("test", "text")),
|
||||
new QueryFilter(new TermQuery(new Term("test", "non-existent-term"))));
|
||||
assertEquals(0, nohits.length());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue