code: Map<String, Integer> getPrefixesIds(String field, List<String> prefixes) {
      LinkedHashMap<String, Long> refs = getPrefixRefs(field);
      if (refs != null) {
        List<String> list = new ArrayList<>(refs.keySet());
        Map<String, Integer> result = new HashMap<>();
        for (String prefix : prefixes) {
          int id = list.indexOf(prefix);
          if (id >= 0) {
            result.put(prefix, id + 1);
          }
        }
        return result;
      } else {
        return null;
      }
    }
docs: Gets the prefixes ids.
  
  @param field
  the field
  @param prefixes
  the prefixes
  @return the prefixes ids