use of com.yahoo.prelude.fastsearch.IntegerField in project vespa by vespa-engine.
the class DocsumDefinitionTestCase method testReading.
@Test
public void testReading() {
String summary_cf = "file:src/test/java/com/yahoo/prelude/fastsearch/test/documentdb-info.cfg";
DocsumDefinitionSet set = createDocsumDefinitionSet(summary_cf);
String[] defs = new String[] { "[default,default]", "[version1,version1]", "[withranklog,withranklog]", "[version2,version2]", "[version3,version3]", "[version4,version4]", "[version5,version5]" };
String setAsString = set.toString();
for (String d : defs) {
assertFalse(setAsString.indexOf(d) == -1);
}
assertEquals(7, set.size());
DocsumDefinition docsum0 = set.getDocsumDefinition("default");
assertNotNull(docsum0);
assertEquals("default", docsum0.getName());
assertEquals(19, docsum0.getFieldCount());
assertNull(docsum0.getField(19));
assertEquals("DSHOST", docsum0.getField(7).getName());
assertTrue(docsum0.getField(1) instanceof StringField);
assertTrue(docsum0.getField(6) instanceof ByteField);
assertTrue(docsum0.getField(7) instanceof IntegerField);
assertTrue(docsum0.getField(18) instanceof DataField);
}
Aggregations