code: private void registerPrefix(String field, String prefix,
        IndexOutput outPrefix) throws IOException {
      if (!prefixReferenceIndex.containsKey(field)) {
        prefixReferenceIndex.put(field, new HashMap<String, Long>());
        prefixIdIndex.put(field, new HashMap<String, Integer>());
      }
      if (!prefixReferenceIndex.get(field).containsKey(prefix)) {
        int id = 1 + prefixReferenceIndex.get(field).size();
        prefixReferenceIndex.get(field).put(prefix, outPrefix.getFilePointer());
        prefixIdIndex.get(field).put(prefix, id);
        outPrefix.writeString(prefix);
      }
    }
docs: Register prefix.
  
  @param field
  the field
  @param prefix
  the prefix
  @param outPrefix
  the out prefix
  @throws IOException
  Signals that an I/O exception has occurred.