public static boolean isSinglePositionPrefix ( FieldInfo fieldInfo , String prefix ) throws IOException { if ( fieldInfo == null ) { throw new IOException ( "no fieldInfo" ) ; } else { String info = fieldInfo . getAttribute ( MtasCodecPostingsFormat . MTAS_FIELDINFO_ATTRIBUTE_PREFIX_SINGLE_POSITION ) ; if ( info == null ) { throw new IOException ( "no " + MtasCodecPostingsFormat . MTAS_FIELDINFO_ATTRIBUTE_PREFIX_SINGLE_POSITION ) ; } else { return Arrays . asList ( info . split ( Pattern . quote ( MtasToken . DELIMITER ) ) ) . contains ( prefix ) ; } } }
Checks if is single position prefix .