@TestInfo(testType=SYSTEM)
public void testBackwardsFacetedSearch() throws InterruptedException {
indexBackwardsFacetedToDocuments(this.indexEngine.getIndexer());
DocumentSearcher searcher = this.indexEngine.getSearcher();
SearchResults searchResults = searcher.search(new Query(new TermQuery("text","a"),"a",null), 0, 10, 0);
Map<String, Multiset<String>> facets = searchResults.getFacets();
//System.out.println("Matches: " + searchResults.getMatches());
//System.out.println(facets);
assertEquals(2, facets.keySet().size());
Multiset<String> precioFacet = facets.get("PRECIO");
assertEquals(2, precioFacet.elementSet().size());
assertEquals(2, precioFacet.count("ALTO"));
assertEquals(3, precioFacet.count("BAJO"));
Multiset<String> tipoFacet = facets.get("TIPO");
assertEquals(2, tipoFacet.elementSet().size());
assertEquals(3, tipoFacet.count("NAH"));
assertEquals(2, tipoFacet.count("SI"));
searchResults = searcher.search(new Query(new TermQuery("text","b"),"b",null), 0, 10, 0);
facets = searchResults.getFacets();
//System.out.println("Matches: " + searchResults.getMatches());
//System.out.println(facets);