text: public void setBytesValue(BytesRef value) {if (!(fieldsData instanceof BytesRef)) {throw new IllegalArgumentException("cannot change value type from " + fieldsData.getClass().getSimpleName() + " to BytesRef");}if (type.indexOptions() != IndexOptions.NONE) {throw new IllegalArgumentException("cannot set a BytesRef value on an indexed field");}if (value == null) {throw new IllegalArgumentException("value must not be null");}fieldsData = value;}