code: @Override
    public void readFrom(StreamInput in) throws IOException {
      super.readFrom(in);
  
      TermsByQueryRequest.TermsEncoding termsEncoding = TermsByQueryRequest.TermsEncoding.values()[in.readVInt()];
      switch (termsEncoding) {
  
        case LONG:
          termsSet = new LongTermsSet(breaker);
          termsSet.readFrom(in);
          return;
  
        case INTEGER:
          termsSet = new IntegerTermsSet(breaker);
          termsSet.readFrom(in);
          return;
  
        case BLOOM:
          termsSet = new BloomFilterTermsSet(breaker);
          termsSet.readFrom(in);
          return;
  
        case BYTES:
          termsSet = new BytesRefTermsSet(breaker);
          termsSet.readFrom(in);
          return;
  
        default:
          throw new IOException("[termsByQuery] Invalid type of terms encoding: " + termsEncoding.name());
  
      }
    }
docs: Deserialize