@Override
 public Query clone() {
   ChildrenConstantScoreQuery q = (ChildrenConstantScoreQuery) super.clone();
   q.originalChildQuery = originalChildQuery.clone();
   if (q.rewrittenChildQuery != null) {
     q.rewrittenChildQuery = rewrittenChildQuery.clone();
   }
   return q;
 }
  @Override
  public boolean equals(Object obj) {
    if (this == obj) {
      return true;
    }
    if (obj == null || obj.getClass() != this.getClass()) {
      return false;
    }

    ChildrenConstantScoreQuery that = (ChildrenConstantScoreQuery) obj;
    if (!originalChildQuery.equals(that.originalChildQuery)) {
      return false;
    }
    if (!childType.equals(that.childType)) {
      return false;
    }
    if (shortCircuitParentDocSet != that.shortCircuitParentDocSet) {
      return false;
    }
    if (getBoost() != that.getBoost()) {
      return false;
    }
    return true;
  }