Example usage for org.apache.solr.schema IndexSchema getDynamicFields

List of usage examples for org.apache.solr.schema IndexSchema getDynamicFields

Introduction

In this page you can find the example usage for org.apache.solr.schema IndexSchema getDynamicFields.

Prototype

public DynamicField[] getDynamicFields() 

Source Link

Usage

From source file:org.vootoo.schema.CrossCoreField.java

License:Apache License

@Override
public void inform(IndexSchema schema) {
    this.schema = schema;
    for (IndexSchema.DynamicField df : schema.getDynamicFields()) {
        if (df.getPrototype().getType() instanceof CrossCoreField) {
            if (!df.getPrototype().getName().startsWith(CROSS_CORE_PREFIX)) {
                throw new RuntimeException(CrossCoreField.class.getSimpleName() + "'s field define name need '"
                        + CROSS_CORE_PREFIX + "' prefix");
            }/*ww  w.j a v  a  2s .c om*/
        }
    }
}