private void findFilterFields(Schema schema, RankProfile profile, Set<String> filterFields) {
        for (Iterator<RankProfile.RankSetting> itr = profile.declaredRankSettingIterator(); itr.hasNext(); ) {
            RankProfile.RankSetting setting = itr.next();
            if (setting.getType().equals(RankProfile.RankSetting.Type.PREFERBITVECTOR) && ((Boolean)setting.getValue()))
            {
                String fieldName = setting.getFieldName();
                if (schema.getConcreteField(fieldName) != null) {
                    if ( ! profile.filterFields().contains(fieldName)) {
                        filterFields.add(fieldName);
                    }
                } else {
                    deployLogger.logApplicationPackage(Level.WARNING, "For rank profile '" + profile.name() + "': Cannot apply rank filter setting to unexisting field '" + fieldName + "'");
                }
            }
        }
    }
Takes the fields and indexes that are of type rank filter, and stores those names on all rank profiles

@author Vegard Havdal
config-model/src/main/java/com/yahoo/schema/processing/FilterFieldNames.java