@Override
 public Query clone() {
   ChildrenQuery q = (ChildrenQuery) 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;
    }

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