예제 #1
0
 @Override
 public Query rewrite(IndexReader reader) throws IOException {
   Query newQ = q.rewrite(reader);
   if (newQ == q) return this;
   BoostedQuery bq = (BoostedQuery) this.clone();
   bq.q = newQ;
   return bq;
 }
예제 #2
0
 @Override
 public boolean equals(Object o) {
   if (getClass() != o.getClass()) return false;
   BoostedQuery other = (BoostedQuery) o;
   return this.getBoost() == other.getBoost()
       && this.q.equals(other.q)
       && this.boostVal.equals(other.boostVal);
 }