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);
}
Aggregations