Commit Graph

37793 Commits

Author SHA1 Message Date
Adrien Grand 1720dc065d Merge branch 'main' into bit_set_iterator_into_bit_set 2024-12-23 15:08:49 +01:00
ChrisHegarty 0494c824e0 Fix 9.12.1 backward compat indices 2024-12-23 09:46:03 +00:00
Adrien Grand b0585f11de
Make inlining of FixedBitSet#get more predictable when checking live docs. (#14077)
This helps make calls sites of `Bits#get` bimorphic at most when checking live
docs. This helps because calls to `FixedBitSet#get` can then be inlined when
live docs are stored in a `FixedBitSet`. Another reason why this is important
is because these calls could be subject to auto-vectorizing when applied to an
array of doc IDs, which cannot apply if the `FixedBitSet#get` call is not
inlined.

While live docs are stored in a `FixedBitSet` by default, some features like
document-level security sometimes create wrappers.
2024-12-23 09:39:59 +01:00
Adrien Grand 42c4c115d6
Add comment to the SIMD intersection logic. (#14073)
I did not know it when I checked in the code, but this is almost exactly the v1
intersection algorithm from the "SIMD compression and the intersection of
sorted integers" paper.
2024-12-23 09:38:50 +01:00
Luca Cavanna 8c7050b428 Move 10.0.1 changelog entries to 10.1.0 section 2024-12-20 23:07:27 +01:00
Luca Cavanna 50932eda5b Add back-compat indices for 10.1.0 2024-12-20 22:51:28 +01:00
Luca Cavanna 340196731e DOAP changes for release 10.1.0 2024-12-20 21:26:40 +01:00
Adrien Grand c97b352487 Optimize BitSetIterator#intoBitSet.
Calling `DocIdSetIterator#intoBitSet` on a `BitSetIterator` copies set bits one
by one from one `BitSet` to another. We can do better.
2024-12-20 14:46:49 +01:00
Adrien Grand a337d14b21
Use the new `loadIntoBitSet` API to speed up dense conjunctions. (#14080)
Now that loading doc IDs into a bit set is much more efficient thanks to
auto-vectorization, it has become tempting to evaluate dense conjunctions by
and-ing bit sets.
2024-12-19 15:05:14 +01:00
Arthur Caccavo aef16daa76
Update stopwords.txt (#14075)
In brazillian portuguese the conjunction "em(preposition)+<a|o|as|os>(article)" take the form "na, nas, no, nos" being common stop words.

For some reason the "nas" conjunction appear twice and the "no" is nowhere to be found, I think it was probably a mistake.

This pull request add the word to the list and remove the duplication.
2024-12-18 19:07:08 -05:00
Robert Muir 58ca67a08d
aws jmh benchmark cleanups (#14072)
* remove hardcoded lucene version, gets benchie working again

* add graviton4 instance type (c8g)

* use https clone to not require agent forwarding

* document prerequisites needed for this to work

* convert README to markdown

* apparently .md files need a license but .txt files do not
2024-12-18 14:43:37 -05:00
Robert Muir 0088308d7c
hunspell: tolerate REP rule count mismatches (#14079)
Similar to support for tolerating PFX/SFX count mismatches, add the
ability to tolerate REP count mismatches.

The issue arises in recent updates to LibreOffice mongolian dictionary
and is currently failing all PRs that change the analyzers:

https://bugs.documentfoundation.org/show_bug.cgi?id=164366
2024-12-18 09:39:49 -05:00
Craig Perkins c9b4bcdced
Fix test failure in TestSoftDeletesDirectoryReaderWrapper on expected number of deletes (#14057)
Signed-off-by: Craig Perkins <cwperx@amazon.com>
2024-12-18 14:51:46 +08:00
Adrien Grand e74f19bf77
Let `DocIdSetIterator` optimize loading into a FixedBitSet. (#14069)
This is an iteration on #14064. The benefits of this approach are that the API
is a bit nicer and allows optimizing not only when doc IDs are stored in an
int[]. The downside is that it only helps non-scoring disjunctions for now, but
we can look into scoring disjunctions later on.
2024-12-17 22:22:49 +01:00
Uwe Schindler 5f0fa2b291
This fixes immutability of clauseSets (broken by #13950) (#14074) 2024-12-17 14:52:42 +01:00
Adrien Grand bc341f2b3e
Speed up advancing on the disjunction iterator. (#14052)
Currently, the disjunction iterator puts all clauses in a heap in order to be
able to merge doc IDs in a streaming fashion. This is a good approach for
exhaustive evaluation, when only one clause moves to a different doc ID on
average and the per-iteration cost is in the order of O(log(N)) where N is the
number of clauses.

However, if a selective filter is applied, this could cause many clauses to
move to a different doc ID. In the worst-case scenario, all clauses could move
to a different doc ID and the cost of maintaiting heap invariants could grow to
O(N * log(N)) (every clause introduces a O(log(N)) cost). With many clauses,
this is much higher than the cost of checking all clauses sequentially: O(N).

To protect from this reordering overhead, DisjunctionDISIApproximation now only
puts the cheapest clauses in a heap in a way that tries to achieve up to 1.5
clauses moving to a different doc ID on average. More expensive clauses are
checked linearly.
2024-12-16 15:33:26 +01:00
Robert Muir a8d8d6b3d9
tidy the QuickPatchThreadsFilter 2024-12-14 14:19:25 -05:00
Dawid Weiss b495a86320 Ignore the default ForkJoinPool's system threads in thread leak detection #14066 2024-12-14 20:05:52 +01:00
ChrisHegarty 9bf2b2064b Add back-compat indices for 9.12.1 #14060 2024-12-14 18:10:30 +01:00
Luca Cavanna d77f9c2568 Add next minor version 10.2.0 2024-12-14 17:21:06 +01:00
Luca Cavanna a1cbdbb0ab Split up clean and check in release wizard prep commands
Relates to #13567
2024-12-14 17:00:35 +01:00
ChrisHegarty 084480dffb DOAP changes for release 9.12.1 2024-12-13 11:18:34 +00:00
Benjamin Trent 1a931e6540
Re-enabling test muted in #11787 (#14061) 2024-12-12 14:15:58 -05:00
Benjamin Trent 6cb79255c4
Adjust test for new random quantization formats (#14058) 2024-12-12 13:22:50 -05:00
Dawid Weiss b9385a8a29
Add github on-commit tests on MacOS and Windows (#14054) 2024-12-10 20:19:28 +01:00
Dawid Weiss 76f5254a75
IndexInput.isLoaded seems to return false for mmap index inputs on Windows #14050 (#14053) 2024-12-10 19:26:18 +01:00
Adrien Grand a62e716f21 Revert "Refactor dummy scorables. (#14046)"
This reverts commit a833887be6.
2024-12-10 16:12:05 +01:00
Michael Sokolov 4f8035c013 Disable KNN format randomization in some KNN block join tests 2024-12-09 12:14:38 -05:00
Michael Sokolov 6b0112cdee
Randomize KnnVector codec params in RandomCodec; addresses gh-14047 (#14049) 2024-12-09 11:22:43 -05:00
Adrien Grand a833887be6
Refactor dummy scorables. (#14046)
This makes our scores that produce dummy scorables share the same implementation.
2024-12-09 15:39:55 +01:00
Adrien Grand e34e0824fd
Reduce specialization in `ForUtil` and `ForDeltaUtil`. (#14048)
These classes specialize all bits per value up to 24. But performance of high
numbers of bits per value is not very important, because they are used by short
postings lists, which are fast to iterate anyway. So this PR only specializes
up to 16 bits per value.

For instance, if a postings list uses blocks of 17 bits per value, it means
that one can find gaps of 65,536 consecutive doc IDs that do not contain the
term. Such rare terms do not drive query performance.
2024-12-07 11:50:29 +01:00
Adrien Grand deae39b01d Fix test failures. 2024-12-06 14:31:33 +01:00
Benjamin Trent f42f03a191
adding changes for PR #13819 (#14044) 2024-12-06 07:03:20 -05:00
Adrien Grand c88f9334e5
Introduce a BulkScorer for DisjunctionMaxQuery. (#14040)
This introduces a bulk scorer for `DisjunctionMaxQuery` that delegates to the
bulk scorers of the query clauses. This helps make the performance of top-level
`DisjunctionMaxQuery` better, especially when its clauses have optimized bulk
scorers themselves (e.g. disjunctions).
2024-12-06 11:01:01 +01:00
Adrien Grand 8103f2a44a
Remove unused +1 on doc buffer length. (#14043)
We no longer take advantatge of it.
2024-12-06 10:43:11 +01:00
Adrien Grand ef2e2548db
Track the number of docs left to decode instead of the number of docs decoded. (#14045)
`docCountUpto` tracks the number of documents decoded so far, but it's only
used to compute the number of docs left to decode. So let's track the number of
docs left to decode instead.
2024-12-06 10:42:39 +01:00
Robert Muir c1362cc6a3
Revert "Ensure Panama float vector distance impls inlinable (#14031)" (#14041)
This reverts commit 4f08f3dc6f.
2024-12-04 15:50:18 -05:00
Adrien Grand 6c48b404cd
Combine all postings enum impls of the default codec into a single class (#14033)
Recent speedups by making call sites bimorphic made me want to play with combining all postings enums and impacts enums of the default codec into a single class, in order to reduce polymorphism. Unfortunately, it does not yield a speedup since the major polymorphic call sites we have that hurt performance (DefaultBulkScorer, ConjunctionDISI) are still 3-polymorphic or more.

Yet, reduced polymorphism at little performance impact is a good trade-off as it would help make call sites bimorphic for users who don't have as much query diversity as nightly benchmarks, or in the future when we remove other causes of polymorphism.
2024-12-04 15:19:41 +01:00
Adrien Grand 3fcadaf8f5
Reduce specialization in TopScoreDocCollector. (#14038)
The specialization of `SimpleCollector` vs. `PagingCollector` only helps save a
null check, so it's probably not worth the complexity. Benchmarks cannot see a
difference with this change.
2024-12-04 15:12:26 +01:00
Adrien Grand b758602273
Improve search equivalence tests. (#14036)
This addresses an existing TODO about giving terms a zipfian distribution, and
disables query caching to make sure that two-phase iterators are properly
tested.
2024-12-04 15:12:04 +01:00
Jim Ferenczi 8fdd48b3b3
Add support for storing term vectors in FeatureField (#14034)
This update introduces an option to store term vectors generated by the FeatureField.
With this option, term vectors can be used to access all features for each document.
2024-12-04 12:31:00 +00:00
Michael Froh 552b3f52d7
Simplify logic in ScoreCachingWrappingScorer (#14012)
This is functionally equivalent to the logic that was present, but
makes the behavior clearer.
2024-12-03 19:24:41 +01:00
Viliam Durina 9c86bed848
Grammar and typo fixes (#14019) 2024-12-03 11:51:53 -05:00
Adrien Grand df7b1f618d
LUCENE-10073: Reduce merging overhead of NRT by using a greater mergeFactor on tiny segments. (#266)
Closes #11111
2024-12-03 17:47:36 +01:00
Chris Hegarty 4f08f3dc6f
Ensure Panama float vector distance impls inlinable (#14031)
This commit reduces the Panama vector distance float implementations to less than the maximum bytecode size of a hot method to be inlined (325).

E.g. Previously:  org.apache.lucene.internal.vectorization.PanamaVectorUtilSupport::dotProductBody (355 bytes)   failed to inline: callee is too large.

After: org.apache.lucene.internal.vectorization.PanamaVectorUtilSupport::dotProductBody (3xx bytes)   inline (hot)

This helps things a little.

Co-authored-by: Robert Muir <rmuir@apache.org>
2024-12-03 10:49:33 +00:00
Adrien Grand b2a10e3643
Speed up PostingsEnum when reading positions. (#14032)
This PR changes the following:
 - As much work as possible is moved from `nextDoc()`/`advance()` to
   `nextPosition()`. This helps only pay the overhead of reading positions when
   all query terms agree on a candidate.
 - Frequencies are read lazily. Again, this helps in case a document is needed
   in a block, but clauses do not agree on a common candidate match, so
   frequencies are never decoded.
 - A few other minor optimizations.
2024-12-02 23:26:04 +01:00
Luca Cavanna 067b472a32 adjust changelog for #14027 2024-12-02 10:33:17 +01:00
Luca Cavanna a6f9bded85
Make SegmentInfos#readCommit(Directory, String, int) public (#14027)
The corresponding readLatestCommit method is public and can be used to
read segment infos from indices that are older than N - 1.
The same should be possible for readCommit, but that requires the method
that takes the minimum supported version as an argument to be public.
2024-12-02 10:24:56 +01:00
zhouhui a2483062d6
Use Arrays.mismatch in FSTCompiler#add. (#13924) 2024-12-01 12:07:08 -05:00
Viliam Durina be66af249f
Fix changelog for GITHUB#14011 (#14018)
* Fix changelog for GITHUB#14011
2024-12-01 11:41:10 -05:00