String docid = "docid";
Document doc = new Document(ImmutableMap.of("text", "this is a sample text", "title", "a headline!"));
indexer.add(docid, doc, (int)timestampBoost, Maps.<Integer, Double>newHashMap());
SearchResults srs = searcher.search(new Query(new TermQuery("text","sample"),null,null),0,10, 0, ImmutableMap.of("fetch_fields", "*"));
SearchResult sr = srs.getResults().iterator().next();
assertEquals("document data modified. fetch_fields='*' should retrieve the same data.", sr.getFields(), doc.asMap());
}
}