public Field(String name, BytesRef bytes, IndexableFieldType type) {if (name == null) {throw new IllegalArgumentException("name must not be null");}if (bytes == null) {throw new IllegalArgumentException("bytes must not be null");}if (type == null) {throw new IllegalArgumentException("type must not be null");}this.name = name;this.fieldsData = bytes;this.type = type;}
public Field(string name, BytesRef bytes, FieldType type){if (name == null){throw new System.ArgumentNullException("name", "name cannot be null");}if (type == null){throw new System.ArgumentNullException("type", "type cannot be null");}if (type.IsIndexed){throw new System.ArgumentException("Fields with BytesRef values cannot be indexed");}this.FieldsData = bytes;this.m_type = type;this.m_name = name;}