public static boolean isSegmentsFile ( String name ) { return name . startsWith ( IndexFileNames . SEGMENTS ) && ! name . equals ( IndexFileNames . SEGMENTS_GEN ) ; }
Check if the file is a segments_N file