@Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    if (!super.equals(o)) return false;

    GlobalOrdinalsQuery that = (GlobalOrdinalsQuery) o;

    if (!fromQuery.equals(that.fromQuery)) return false;
    if (!joinField.equals(that.joinField)) return false;
    if (!toQuery.equals(that.toQuery)) return false;
    if (!indexReader.equals(that.indexReader)) return false;

    return true;
  }
 /** @see LuceneIndexReader#equals(Object) */
 public boolean equals(Object obj) {
   return indexReader.equals(obj);
 }