private void applyMorphLineParams(IndexerConf indexerConf) { Map<String, String> params = indexerConf.getGlobalParams(); if (morphlineFile != null) { params.put( MorphlineResultToSolrMapper.MORPHLINE_FILE_PARAM, morphlineFile.getPath()); } if (morphlineId != null) { params.put( MorphlineResultToSolrMapper.MORPHLINE_ID_PARAM, morphlineId); } for (Map.Entry<String, String> entry : conf) { if (entry.getKey().startsWith(MorphlineResultToSolrMapper.MORPHLINE_VARIABLE_PARAM + ".")) { params.put(entry.getKey(), entry.getValue()); } if (entry.getKey().startsWith(MorphlineResultToSolrMapper.MORPHLINE_FIELD_PARAM + ".")) { params.put(entry.getKey(), entry.getValue()); } } indexerConf.setGlobalParams(params); }
private void applyMorphLineParams(IndexerConf indexerConf) { Map<String, String> params = indexerConf.getGlobalParams(); if (morphlineFile != null) { params.put( MorphlineResultToSolrMapper.MORPHLINE_FILE_PARAM, morphlineFile.getPath()); } if (morphlineId != null) { params.put( MorphlineResultToSolrMapper.MORPHLINE_ID_PARAM, morphlineId); } for (Map.Entry<String, String> entry : conf) { if (entry.getKey().startsWith(MorphlineResultToSolrMapper.MORPHLINE_VARIABLE_PARAM + ".")) { params.put(entry.getKey(), entry.getValue()); } if (entry.getKey().startsWith(MorphlineResultToSolrMapper.MORPHLINE_FIELD_PARAM + ".")) { params.put(entry.getKey(), entry.getValue()); } } indexerConf.setGlobalParams(params); }
indexerConf = new IndexerConfBuilder(indexerConf).rowReadMode(RowReadMode.NEVER).build(); indexerConf.setGlobalParams(params);
indexerConf = new IndexerConfBuilder(indexerConf).rowReadMode(RowReadMode.NEVER).build(); indexerConf.setGlobalParams(params);
public IndexerConf build() { checkNotNull(table, "table name"); IndexerConf conf = new IndexerConf(table); conf.setMappingType(mappingType != null ? mappingType : IndexerConf.DEFAULT_MAPPING_TYPE); conf.setRowReadMode(rowReadMode != null ? rowReadMode : IndexerConf.DEFAULT_ROW_READ_MODE); conf.setUniqueKeyField(uniqueKeyField != null ? uniqueKeyField : IndexerConf.DEFAULT_UNIQUE_KEY_FIELD); conf.setRowField(rowField); conf.setColumnFamilyField(columnFamilyField); conf.setTableNameField(tableNameField); conf.setMapperClass(mapperClass); conf.setUniqueKeyFormatterClass(uniqueKeyFormatterClass != null ? uniqueKeyFormatterClass : IndexerConf.DEFAULT_UNIQUE_KEY_FORMATTER); conf.setFieldDefinitions(fieldDefinitions); conf.setDocumentExtractDefinitions(documentExtractDefinitions); conf.setGlobalParams(globalParams); return conf; } }
public IndexerConf build() { checkNotNull(table, "table name"); IndexerConf conf = new IndexerConf(table); conf.setMappingType(mappingType != null ? mappingType : IndexerConf.DEFAULT_MAPPING_TYPE); conf.setRowReadMode(rowReadMode != null ? rowReadMode : IndexerConf.DEFAULT_ROW_READ_MODE); conf.setUniqueKeyField(uniqueKeyField != null ? uniqueKeyField : IndexerConf.DEFAULT_UNIQUE_KEY_FIELD); conf.setRowField(rowField); conf.setColumnFamilyField(columnFamilyField); conf.setTableNameField(tableNameField); conf.setMapperClass(mapperClass); conf.setUniqueKeyFormatterClass(uniqueKeyFormatterClass != null ? uniqueKeyFormatterClass : IndexerConf.DEFAULT_UNIQUE_KEY_FORMATTER); conf.setFieldDefinitions(fieldDefinitions); conf.setDocumentExtractDefinitions(documentExtractDefinitions); conf.setGlobalParams(globalParams); return conf; } }