private void verifyWithSchema(Map<String,EntityField> fields) { Map<String,SchemaField> schemaFields = null; if (schema == null) { schemaFields = Collections.emptyMap(); } else { schemaFields = schema.getFields(); } for (Map.Entry<String,SchemaField> entry : schemaFields.entrySet()) { SchemaField sf = entry.getValue(); if (!fields.containsKey(sf.getName())) { if (sf.isRequired()) { log.info(sf.getName() + " is a required field in SolrSchema . But not found in DataConfig"); } } } for (Map.Entry<String,EntityField> entry : fields.entrySet()) { EntityField fld = entry.getValue(); SchemaField field = getSchemaField(fld.getName()); if (field == null && !isSpecialCommand(fld.getName())) { log.info("The field :" + fld.getName() + " present in DataConfig does not have a counterpart in Solr Schema"); } } }
private void validateSchema(IndexSchema schema) { if (schema.getUniqueKeyField() == null) { throw new MorphlineCompilationException("Solr schema.xml is missing unique key field", config); } if (!schema.getUniqueKeyField().isRequired()) { throw new MorphlineCompilationException("Solr schema.xml must contain a required unique key field", config); } }
private void validateSchema(IndexSchema schema) { if (schema.getUniqueKeyField() == null) { throw new MorphlineCompilationException("Solr schema.xml is missing unique key field", config); } if (!schema.getUniqueKeyField().isRequired()) { throw new MorphlineCompilationException("Solr schema.xml must contain a required unique key field", config); } }
private void validateSchema(IndexSchema schema) { if (schema.getUniqueKeyField() == null) { throw new MorphlineCompilationException("Solr schema.xml is missing unique key field", config); } if (!schema.getUniqueKeyField().isRequired()) { throw new MorphlineCompilationException("Solr schema.xml must contain a required unique key field", config); } }
private void validateSchema(IndexSchema schema) { if (schema.getUniqueKeyField() == null) { throw new MorphlineCompilationException("Solr schema.xml is missing unique key field", config); } if (!schema.getUniqueKeyField().isRequired()) { throw new MorphlineCompilationException("Solr schema.xml must contain a required unique key field", config); } }
if (solrField.isRequired() && !schemeFieldnames.contains(solrFieldname)) { throw new TapException("No sink field name for required Solr field: " + solrFieldname);
fieldsWithDefaultValue.add( f ); if (f.isRequired()) { log.debug(name+" is required in this schema"); requiredFields.add(f);
field.add( "type", ft.getTypeName() ); field.add( "flags", getFieldFlags(f) ); if( f.isRequired() ) { field.add( "required", f.isRequired() );