diff options
author | Jon Bratseth <bratseth@oath.com> | 2018-09-24 17:01:43 -0700 |
---|---|---|
committer | Jon Bratseth <bratseth@oath.com> | 2018-09-24 17:01:43 -0700 |
commit | 015abd305551de1201586398bedcef98a65732ae (patch) | |
tree | 96784a072480e27cc85b8f9fa5783d622bff4fdc /config-model/src/main/java/com/yahoo/searchdefinition/derived | |
parent | 6162ec099bc06ac7ba7a82f2ca59aa1e869a6c96 (diff) | |
parent | 843eff1591eebee0f59eb9ef36e44989952c319b (diff) |
Merge with master
Diffstat (limited to 'config-model/src/main/java/com/yahoo/searchdefinition/derived')
-rw-r--r-- | config-model/src/main/java/com/yahoo/searchdefinition/derived/Deriver.java | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/derived/Deriver.java b/config-model/src/main/java/com/yahoo/searchdefinition/derived/Deriver.java index e6b6c58cb38..133adb45dd9 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/derived/Deriver.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/derived/Deriver.java @@ -3,7 +3,6 @@ package com.yahoo.searchdefinition.derived; import com.yahoo.document.DocumenttypesConfig; import com.yahoo.document.config.DocumentmanagerConfig; import com.yahoo.searchdefinition.SearchBuilder; -import com.yahoo.searchdefinition.UnprocessingSearchBuilder; import com.yahoo.searchdefinition.parser.ParseException; import com.yahoo.vespa.configmodel.producers.DocumentManager; import com.yahoo.vespa.configmodel.producers.DocumentTypes; @@ -18,25 +17,6 @@ import java.util.List; */ public class Deriver { - /** - * Derives only document manager. - * - * - * @param sdFileNames The name of the search definition files to derive from. - * @param toDir The directory to write configuration to. - * @return The list of Search objects, possibly "unproper ones", from sd files containing only document - */ - public static SearchBuilder deriveDocuments(List<String> sdFileNames, String toDir) { - SearchBuilder builder = getUnprocessingSearchBuilder(sdFileNames); - DocumentmanagerConfig.Builder documentManagerCfg = new DocumentManager().produce(builder.getModel(), new DocumentmanagerConfig.Builder()); - try { - DerivedConfiguration.exportDocuments(documentManagerCfg, toDir); - } catch (IOException e) { - throw new IllegalArgumentException(e); - } - return builder; - } - public static SearchBuilder getSearchBuilder(List<String> sds) { SearchBuilder builder = new SearchBuilder(); try { @@ -50,19 +30,6 @@ public class Deriver { return builder; } - public static SearchBuilder getUnprocessingSearchBuilder(List<String> sds) { - SearchBuilder builder = new UnprocessingSearchBuilder(); - try { - for (String s : sds) { - builder.importFile(s); - } - } catch (ParseException | IOException e) { - throw new IllegalArgumentException(e); - } - builder.build(); - return builder; - } - public static DocumentmanagerConfig.Builder getDocumentManagerConfig(String sd) { return getDocumentManagerConfig(Collections.singletonList(sd)); } |