BlsUtils { public static Query parseFilter(BlackLabIndex index, String filter, String filterLang) throws BlsException { return BlsUtils.parseFilter(index, filter, filterLang, false); }  static Query parseFilter(BlackLabIndex index, String filter,
            String filterLang); static Query parseFilter(BlackLabIndex index, String filter,
            String filterLang, boolean required); static TextPattern parsePatt(BlackLabIndex index, String pattern,
            String language, boolean required); static TextPattern parsePatt(BlackLabIndex index, String pattern,
            String language); static int getDocIdFromPid(BlackLabIndex index, String pid); static boolean isSymlink(File file); static void delTree(File root); static FileFilter readableDirFilter; }
@Test public void testParseFilter() throws BlsException { Query f = new TermQuery(new Term("author", "me")); Assert.assertEquals(f, BlsUtils.parseFilter(index, "author:me", "luceneql")); Assert.assertEquals(f, BlsUtils.parseFilter(index, "author:me", "luceneql", true)); }
@Test public void testParseFilterContextQl() throws BlsException { Query f = new WildcardQuery(new Term("author", "me")); Assert.assertEquals(f, BlsUtils.parseFilter(index, "author = me", "contextql")); }
@Test(expected = BadRequest.class) public void testParseFilterWrongLanguage() throws BlsException { BlsUtils.parseFilter(index, "author:me", "corpusql"); }
@Test(expected = BadRequest.class) public void testParseFilterNoFilter() throws BlsException { BlsUtils.parseFilter(index, "", "luceneql", true); }