test/src/kbasesearchengine/test/search/SearchTypesTest.java
@Test
    public void searchTypes_GreaterThan10TypesIndexed() throws Exception {
        int itemCount = 11;

        // Setting null ensures that the default aggregation value of
        // 1000 is used. (See tests below for setting that value.)
        IndexingStorage indexStorage = createIndexingStorage(null);

        ImmutableMap.Builder<String, Integer> expectedBuilder = ImmutableMap.<String, Integer>builder();
        for (int i = 0; i < itemCount; i += 1) {
                indexOne(indexStorage, new Integer(i), true);
                expectedBuilder.put("SearchType" + i, 1);
        }
        ImmutableMap<String, Integer> expected =  expectedBuilder.build();

        final Map<String, Integer> typeCounts = indexStorage.searchTypes(
                MatchFilter.getBuilder()
                        .withNullableFullTextInAll(null)
                        .withExcludeSubObjects(true)
                        .build(),
                AccessFilter.create()
                        .withPublic(true));
        
        assertThat("inccorect type count", typeCounts.size(), is(itemCount));
        assertThat("incorrect type summary", typeCounts, is(expected));
    }
/*
        searchTypes_GreaterThan10TypesIndexed() tests a query over 11 types with the
        default aggregation size, which should be 1000. 
        Without the default aggregation size set as such, the total number 
        of buckets returned is 10 and this test would fail. In fact,
        this is the precise number of types which trigerred the
        report of this error and the addition of the aggregation size.
    */
searchTypes_GreaterThan10TypesIndexed() tests a query over 11 types with the
default aggregation size, which should be 1000.
Without the default aggregation size set as such, the total number
of buckets returned is 10 and this test would fail. In fact,
this is the precise number of types which trigerred the
report of this error and the addition of the aggregation size.
searchTypes_GreaterThan10TypesIndexed () tests a query over 11 types with the default aggregation size which should be 1000 . Without the default aggregation size set as such the total number of buckets returned is 10 and this test would fail . In fact this is the precise number of types which trigerred the report of this error and the addition of the aggregation size .
@Test
    public void searchTypes_GreaterThan10TypesIndexed() throws Exception {
        int itemCount = 11;
        IndexingStorage indexStorage = createIndexingStorage(null);
        ImmutableMap.Builder<String, Integer> expectedBuilder = ImmutableMap.<String, Integer>builder();
        for (int i = 0; i < itemCount; i += 1) {
                indexOne(indexStorage, new Integer(i), true);
                expectedBuilder.put("SearchType" + i, 1);
        }
        ImmutableMap<String, Integer> expected =  expectedBuilder.build();
        final Map<String, Integer> typeCounts = indexStorage.searchTypes(
                MatchFilter.getBuilder()
                        .withNullableFullTextInAll(null)
                        .withExcludeSubObjects(true)
                        .build(),
                AccessFilter.create()
                        .withPublic(true));
        assertThat("inccorect type count", typeCounts.size(), is(itemCount));
        assertThat("incorrect type summary", typeCounts, is(expected));
    }
@ Test public void searchTypes_GreaterThan10TypesIndexed ( ) throws Exception { int itemCount = 11 ; IndexingStorage indexStorage = createIndexingStorage ( null ) ; ImmutableMap . Builder < String , Integer > expectedBuilder = ImmutableMap . < String , Integer > builder ( ) ; for ( int i = 0 ; i < itemCount ; i += 1 ) { indexOne ( indexStorage , new Integer ( i ) , true ) ; expectedBuilder . put ( "SearchType" + i , 1 ) ; } ImmutableMap < String , Integer > expected = expectedBuilder . build ( ) ; final Map < String , Integer > typeCounts = indexStorage . searchTypes ( MatchFilter . getBuilder ( ) . withNullableFullTextInAll ( null ) . withExcludeSubObjects ( true ) . build ( ) , AccessFilter . create ( ) . withPublic ( true ) ) ; assertThat ( "inccorect type count" , typeCounts . size ( ) , is ( itemCount ) ) ; assertThat ( "incorrect type summary" , typeCounts , is ( expected ) ) ; }
searchTypes_GreaterThan10TypesIndexed() tests a query over 11 types with the
default aggregation size, which should be 1000.
searchTypes_GreaterThan10TypesIndexed () tests a query over 11 types with the default aggregation size which should be 1000 .
// Setting null ensures that the default aggregation value of // 1000 is used. (See tests below for setting that value.)