Skip to content

Commit

Permalink
Merge branch 'main' into optimize_caseless_regexp
Browse files Browse the repository at this point in the history
  • Loading branch information
rmuir committed Feb 5, 2025
2 parents 608c58a + 4cd4f8e commit ed0955b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions gradle/validation/error-prone.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ if (!propertyOrDefault("validation.errorprone", isCIBuild).asBoolean()) {
skipReason = "skipped on builds not running inside CI environments, pass -Pvalidation.errorprone=true to enable"
}

skipReason = "failing in CI builds with NoSuchMethodError due to use of internal compiler APIs"

if (skipReason) {
configure(rootProject) {
task errorProneSkipped() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@
* undefined as long as they both leave from the same position. As result, all synonyms of a
* token would be considered to appear in exactly the same position as that token, and so
* would they be seen by phrase and proximity searches. For multi-token synonyms to work
* correctly, you should use {@code SynoymGraphFilter} at search time only.
* correctly, you should use {@code SynonymGraphFilter} at search time only.
* </ol>
*
* <h3>Token Position Length</h3>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,11 @@ private static class TopDocsDISI extends DocIdSetIterator {
private final int[] sortedDocIds;
private int idx = -1;

private TopDocsDISI(TopDocs topDocs) {
private TopDocsDISI(TopDocs topDocs, LeafReaderContext ctx) {
sortedDocIds = new int[topDocs.scoreDocs.length];
for (int i = 0; i < topDocs.scoreDocs.length; i++) {
sortedDocIds[i] = topDocs.scoreDocs[i].doc;
// Remove the doc base as added by the collector
sortedDocIds[i] = topDocs.scoreDocs[i].doc - ctx.docBase;
}
Arrays.sort(sortedDocIds);
}
Expand Down Expand Up @@ -311,7 +312,8 @@ public KnnCollector newCollector(
}
// Most underlying iterators are indexed, so we can map the seed docs to the vector docs
if (vectorIterator instanceof KnnVectorValues.DocIndexIterator indexIterator) {
DocIdSetIterator seedDocs = new MappedDISI(indexIterator, new TopDocsDISI(seedTopDocs));
DocIdSetIterator seedDocs =
new MappedDISI(indexIterator, new TopDocsDISI(seedTopDocs, ctx));
return knnCollectorManager.newCollector(
visitLimit, new KnnSearchStrategy.Seeded(seedDocs, seedTopDocs.scoreDocs.length), ctx);
}
Expand Down

0 comments on commit ed0955b

Please sign in to comment.