"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lucene/test-framework/src/java/org/apache/lucene/tests/search/BlockScoreQueryWrapper.java" between
lucene-9.6.0-src.tgz and lucene-9.7.0-src.tgz

About: Lucene is a Java full-text search engine (not a complete application, but rather a code library and API). Java source code.
The most recent release (9.x series).

BlockScoreQueryWrapper.java  (lucene-9.6.0-src.tgz):BlockScoreQueryWrapper.java  (lucene-9.7.0-src.tgz)
skipping to change at line 22 skipping to change at line 22
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.apache.lucene.tests.search; package org.apache.lucene.tests.search;
import java.io.IOException; import java.io.IOException;
import java.util.Arrays; import java.util.Arrays;
import java.util.Objects; import java.util.Objects;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.LeafReaderContext; import org.apache.lucene.index.LeafReaderContext;
import org.apache.lucene.search.DocIdSetIterator; import org.apache.lucene.search.DocIdSetIterator;
import org.apache.lucene.search.Explanation; import org.apache.lucene.search.Explanation;
import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.Query; import org.apache.lucene.search.Query;
import org.apache.lucene.search.QueryVisitor; import org.apache.lucene.search.QueryVisitor;
import org.apache.lucene.search.ScoreMode; import org.apache.lucene.search.ScoreMode;
import org.apache.lucene.search.Scorer; import org.apache.lucene.search.Scorer;
import org.apache.lucene.search.Weight; import org.apache.lucene.search.Weight;
import org.apache.lucene.util.ArrayUtil; import org.apache.lucene.util.ArrayUtil;
skipping to change at line 72 skipping to change at line 71
@Override @Override
public int hashCode() { public int hashCode() {
int h = classHash(); int h = classHash();
h = 31 * h + query.hashCode(); h = 31 * h + query.hashCode();
h = 31 * h + blockLength; h = 31 * h + blockLength;
return h; return h;
} }
@Override @Override
public Query rewrite(IndexReader reader) throws IOException { public Query rewrite(IndexSearcher indexSearcher) throws IOException {
final Query rewritten = query.rewrite(reader); final Query rewritten = query.rewrite(indexSearcher);
if (rewritten != query) { if (rewritten != query) {
return new BlockScoreQueryWrapper(rewritten, blockLength); return new BlockScoreQueryWrapper(rewritten, blockLength);
} }
return super.rewrite(reader); return super.rewrite(indexSearcher);
} }
@Override @Override
public void visit(QueryVisitor visitor) { public void visit(QueryVisitor visitor) {
query.visit(visitor); query.visit(visitor);
} }
@Override @Override
public Weight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost) public Weight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost)
throws IOException { throws IOException {
 End of changes. 3 change blocks. 
4 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)