br.addSelection(sel);
HashMap<String, List<BrowseFacet>> answer = new HashMap<String, List<BrowseFacet>>();
doTest(br, 3, answer, new String[] { "1", "2", "7" });
BoboMultiReader reader = null;
try {
Analyzer analyzer = new StandardAnalyzer(Version.LUCENE_43);
IndexWriterConfig config = new IndexWriterConfig(Version.LUCENE_43, analyzer);
IndexWriter idxWriter = new IndexWriter(_indexDir, config);
idxWriter.deleteDocuments(new Term("id", "1"));
idxWriter.deleteDocuments(new Term("id", "2"));
idxWriter.commit();
reader = newIndexReader();
br = new BrowseRequest();
br.setCount(10);
br.setOffset(0);
sel = new BrowseSelection("color");
sel.addValue("red");
br.addSelection(sel);
answer = new HashMap<String, List<BrowseFacet>>();
doTest(new BoboBrowser(reader), br, 1, answer, new String[] { "7" });
} catch (IOException ioe) {
fail(ioe.getMessage());
} finally {
if (reader != null) {
try {
reader.close();
} catch (IOException e) {
fail(e.getMessage());
}
}
}