@Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (!super.equals(obj)) return false;
   if (getClass() != obj.getClass()) return false;
   PayloadBoostTermQuery other = (PayloadBoostTermQuery) obj;
   if (function == null) {
     if (other.function != null) return false;
   } else if (!function.equals(other.function)) return false;
   if (includeSpanScore != other.includeSpanScore) return false;
   return true;
 }