Example usage for org.apache.solr.schema FieldProperties OMIT_NORMS

List of usage examples for org.apache.solr.schema FieldProperties OMIT_NORMS

Introduction

In this page you can find the example usage for org.apache.solr.schema FieldProperties OMIT_NORMS.

Prototype

int OMIT_NORMS

To view the source code for org.apache.solr.schema FieldProperties OMIT_NORMS.

Click Source Link

Usage

From source file:com.sindicetech.siren.solr.schema.ExtendedJsonField.java

License:Open Source License

private void checkFieldTypeProperties() {
    if (this.isMultiValued()) {
        throw new SolrException(SolrException.ErrorCode.SERVER_ERROR,
                "ExtendedJsonField types can not be multiValued: " + this.typeName);
    }/*  ww  w.  j a  va2  s  .  c  o  m*/
    if (!this.hasProperty(FieldProperties.OMIT_NORMS)) {
        throw new SolrException(SolrException.ErrorCode.SERVER_ERROR,
                "ExtendedJsonField types must omit norms: " + this.typeName);
    }
    if (this.hasProperty(FieldProperties.OMIT_TF_POSITIONS)) {
        throw new SolrException(SolrException.ErrorCode.SERVER_ERROR,
                "ExtendedJsonField types can not omit term frequencies " + "and positions: " + this.typeName);
    }
    if (this.hasProperty(FieldProperties.OMIT_POSITIONS)) {
        throw new SolrException(SolrException.ErrorCode.SERVER_ERROR,
                "ExtendedJsonField types can not omit positions: " + this.typeName);
    }
    if (this.hasProperty(FieldProperties.STORE_TERMVECTORS)) {
        throw new SolrException(SolrException.ErrorCode.SERVER_ERROR,
                "ExtendedJsonField types can not store term vectors: " + this.typeName);
    }
}