Search in sources :

Example 1 with SearchDefinitionBuilder

use of com.yahoo.vespa.model.content.utils.SearchDefinitionBuilder in project vespa by vespa-engine.

the class ContentSearchClusterTest method createClusterWithThreeDocumentTypes.

private static ContentCluster createClusterWithThreeDocumentTypes() throws Exception {
    List<String> searchDefinitions = new ArrayList<>();
    searchDefinitions.add(new SearchDefinitionBuilder().name("a").content(joinLines("field ref_to_b type reference<b> { indexing: attribute }", "field ref_to_c type reference<c> { indexing: attribute }")).build());
    searchDefinitions.add(new SearchDefinitionBuilder().name("b").content("field ref_to_c type reference<c> { indexing: attribute }").build());
    searchDefinitions.add(new SearchDefinitionBuilder().name("c").build());
    return createCluster(new ContentClusterBuilder().docTypes(Arrays.asList(DocType.index("a"), DocType.indexGlobal("b"), DocType.indexGlobal("c"))).getXml(), searchDefinitions);
}
Also used : ContentClusterBuilder(com.yahoo.vespa.model.content.utils.ContentClusterBuilder) ArrayList(java.util.ArrayList) SearchDefinitionBuilder(com.yahoo.vespa.model.content.utils.SearchDefinitionBuilder)

Aggregations

ContentClusterBuilder (com.yahoo.vespa.model.content.utils.ContentClusterBuilder)1 SearchDefinitionBuilder (com.yahoo.vespa.model.content.utils.SearchDefinitionBuilder)1 ArrayList (java.util.ArrayList)1