private String getFieldType ( IndexSchema schema , String field ) throws IOException { SchemaField sf = schema . getField ( field ) ; FieldType ft = sf . getType ( ) ; if ( ft != null ) { if ( ft . isPointField ( ) && ! sf . hasDocValues ( ) ) { return ComponentFacet . TYPE_POINTFIELD_WITHOUT_DOCVALUES ; } NumberType nt = ft . getNumberType ( ) ; if ( nt != null ) { return nt . name ( ) ; } else { return ComponentFacet . TYPE_STRING ; } } else { // best guess return ComponentFacet . TYPE_STRING ; } }
Gets the field type .