public void testDocFields() throws Exception {
String indexName = "test-doc-fields";
Index index = searchService.getIndex(IndexSpec.newBuilder().setName(indexName));
delDocs(index);
Builder docBuilder = Document.newBuilder();
Field field = Field.newBuilder().setName("textfield").setText("text field").build();
docBuilder.addField(field);
field = Field.newBuilder().setName("numberfield").setNumber(123).build();
docBuilder.addField(field);
Date now = new Date();
field = Field.newBuilder().setName("datefield").setDate(now).build();
docBuilder.addField(field);
field = Field.newBuilder().setName("htmlfield").setHTML("<html>html field</html>").build();
docBuilder.addField(field);
User currentUser = new User("prometheus-qa@appenginetest.com", "appenginetest.com");
field = Field.newBuilder().setName("atomfield").setAtom(currentUser.getAuthDomain()).build();
docBuilder.addField(field);
GeoPoint geoPoint = new GeoPoint((double) -10, 10.000001);
field = Field.newBuilder().setName("geofield").setGeoPoint(geoPoint).build();
docBuilder.addField(field);
index.put(docBuilder);
sync();
Results<ScoredDocument> result = searchDocs(index, "", 0);
assertEquals(1, result.getNumberReturned());