code: @Override
    public PostingsFormat postingsFormat() {
      initDelegate();
      if (delegate.postingsFormat() instanceof PerFieldPostingsFormat) {
        Codec defaultCodec = Codec.getDefault();
        PostingsFormat defaultPostingsFormat = defaultCodec.postingsFormat();
        if (defaultPostingsFormat instanceof PerFieldPostingsFormat) {
          defaultPostingsFormat = ((PerFieldPostingsFormat) defaultPostingsFormat)
              .getPostingsFormatForField(null);
          if ((defaultPostingsFormat == null)
              || (defaultPostingsFormat instanceof PerFieldPostingsFormat)) {
            // fallback option
            return new MtasCodecPostingsFormat(
                PostingsFormat.forName("Lucene70"));
          } else {
            return new MtasCodecPostingsFormat(defaultPostingsFormat);
          }
        } else {
          return new MtasCodecPostingsFormat(defaultPostingsFormat);
        }
      } else {
        return new MtasCodecPostingsFormat(delegate.postingsFormat());
      }
    }
docs: /*
  (non-Javadoc)
  
  @see org.apache.lucene.codecs.Codec#postingsFormat()