public VariantSearchManager getVariantSearchManager() throws StorageEngineException { if (variantSearchManager.get() == null) { synchronized (variantSearchManager) { if (variantSearchManager.get() == null) { // TODO One day we should use reflection here reading from storage-configuration.yml variantSearchManager.set(new VariantSearchManager(getStudyConfigurationManager(), configuration)); } } } return variantSearchManager.get(); }
VariantSearchManager variantSearchManager = new VariantSearchManager(variantStorageEngine.getStudyConfigurationManager(), variantStorageEngine.getConfiguration()); boolean querying = true;
@Test @Ignore public void insertVariantIntoSolr() throws Exception { clearDB(DB_NAME); ObjectMap params = new ObjectMap(); StudyConfiguration studyConfiguration = newStudyConfiguration(); params.put(VariantStorageEngine.Options.STUDY.key(), studyConfiguration.getStudyName()); params.put(VariantStorageEngine.Options.TRANSFORM_FORMAT.key(), "json"); params.put(VariantStorageEngine.Options.COMPRESS_METHOD.key(), "gZiP"); params.put(VariantStorageEngine.Options.TRANSFORM_THREADS.key(), 1); params.put(VariantStorageEngine.Options.LOAD_THREADS.key(), 1); params.put(VariantStorageEngine.Options.ANNOTATE.key(), true); runETL(variantStorageEngine, params, true, true, true); VariantDBAdaptor dbAdaptor = getVariantStorageEngine().getDBAdaptor(); VariantSearchManager variantSearchManager = new VariantSearchManager(null, variantStorageEngine.getConfiguration()); // FIXME Collection is not in the configuration any more // variantSearchManager.load(variantStorageEngine.getConfiguration().getSearch().getCollection(), dbAdaptor.iterator()); }