Commit Graph

37742 Commits

Author SHA1 Message Date
expani da2325cdbd Adding new encoder with only readLong instead of readInt to easily compare performance 2024-10-24 10:23:45 +05:30
expani 4d10d9d5eb Adding new encoder with only readLong instead of readInt to easily compare performance 2024-10-24 10:17:59 +05:30
expani af8b914a9f Changed readLong to readInt for trailing docIds in leaf block 2024-10-22 18:08:14 +05:30
expani 7f95cd383e Excluding lines with comments 2024-10-22 13:47:30 +05:30
expani ecf53d921d Made loading docIdSequences parallel to reduce benchmark time 2024-10-20 18:13:22 +05:30
expani b2c45e53b8 Removed print statements for debugging stages 2024-10-20 11:14:11 +05:30
expani fdca13f77a Added extra loggers 2024-10-19 11:05:11 +05:30
expani 5b6b26d4eb Disabling encode benchmark temporarily 2024-10-19 10:31:53 +05:30
expani 0d1d8799c4 Temporarily added debug loggers to track for larger inputs 2024-10-19 10:20:14 +05:30
expani dc3d6fc9c1 Closing IndexInput after every use 2024-10-19 09:53:15 +05:30
expani 4406d75b00 Benchmarking effects of only using writeLong instead of writeInt 2024-10-18 15:40:05 +05:30
expani 359440a7dc Fixed file cleanup for unit tests 2024-10-16 18:49:08 +05:30
expani1729 7312d91394
Merge branch 'apache:main' into bpv21_main 2024-10-16 15:17:20 +05:30
expani 295531c9a3 Made encoding conditional based on architecture 2024-10-16 14:33:03 +05:30
expani 33fd619dd0 Auto inferring docIdProvider 2024-10-16 11:14:46 +05:30
Zhang Chao 789658819f
Remove redundant code in PointInSetQuery (#13905) 2024-10-16 10:33:53 +08:00
Armin Braun 331323f1b9
Avoid slicing memory segments unnecessarily (#13906)
No point in copying the memory segment instances when slicing, they are stateless.
2024-10-15 20:53:54 +02:00
Adrien Grand f69b196ef2
Skip madvise calls on tiny inner files of compound files. (#13917)
This commit skips `madvise` calls on inner files of compound files that are
smaller than the page size.
2024-10-15 16:17:51 +02:00
Adrien Grand 5fd45254d3
Better handle dynamic pruning when the leading clause has a single impact block. (#13904)
`BlockMaxConjunctionBulkScorer` only checks if it can early exit based on
impacts once per window, and windows are computed using impact blocks of the
leading clause. So this logic is defeated if the leading clause produces a
single block (e.g. `ConstantScoreQuery`). This commit addresses this problem by
artificially lowering the window size to contain ~128 docs of the leading
clause.
2024-10-15 16:17:20 +02:00
zhouhui 4d19a5408e
Optimize convert byte2int. (#13889) 2024-10-15 16:12:48 +02:00
Adrien Grand cf29597fec
Make MaxScoreBulkScorer repartition scorers when the min competitive increases. (#13800)
MaxScoreBulkScorer partitions scorers into a set of essential scorers and a set
of non-essential scorers, depending on the maximum scores produced by scorers
and on the current minimum competitive score. An increase of the minimum
competitive score has the potential to yield a more favorable partitioning, but
repartitioning can also be expensive.

In order to repartition when necessary while avoiding to repartition too often,
this PR tracks the minimum value of the minimum competitive score that would
produce a more favorable partitioning, and repartitions scorers whenever the
minimum competitive score exceeds this threshold.
2024-10-15 15:20:34 +02:00
Luca Cavanna 352d85cbe4 Re-enable backwards compatibility tests for version >=10 2024-10-15 15:05:41 +02:00
expani 4fb0a87495 Fixed all gradle failures 2024-10-15 18:24:37 +05:30
expani1729 336308ede2
Merge branch 'apache:main' into bpv21_main 2024-10-15 18:14:28 +05:30
expani 8d6f7caaa5 Refactoring 2024-10-15 18:13:42 +05:30
expani 585309317e Removed resource file with hardcoded docIds 2024-10-15 18:05:02 +05:30
Luca Cavanna 3d6af9cecc Add back-compat indices for 10.0.0 2024-10-15 14:32:06 +02:00
expani 33232e57c8 Removed resource file with hardcoded docIds 2024-10-15 17:57:07 +05:30
expani 68d0bbff0c Added unit tests to randomly generate docIds for all encoders 2024-10-15 17:45:04 +05:30
expani fd862b7d0a Added unit tests to randomly generate docIds for all encoders 2024-10-15 17:45:04 +05:30
Adrien Grand e2636c648d
Only call madvise when necessary. (#13907)
This commit tries to save calls to `madvise` which are not necessary, either
because they map to the OS' default, or because the advice would be overridden
later on anyway. I have not noticed specific problems with this, but it seems
desirable to keep calls to `madvise` to a minimum.

As a consequence:
 - Files that are open with `ReadAdvice.NORMAL` do not call `madvise` since
   this is the OS' default.
 - Compound files are always open with `ReadAdvice.NORMAL`, and the actual is
   only set when opening sub files of these compound files.

To make the latter less trappy, the `IOContext` parameter has been removed from
`CompoundFormat#getCompoundReader`.
2024-10-15 14:14:27 +02:00
Luca Cavanna 66bb46f71f Align TestGenerateBwcIndices.java with AddBackcompatindices.py (#13911)
We updated TestGenerateBwcIndices to create int7 HNSW indices instead of int8 with #13874.
The corresponding python code part of the release wizard needs to be updated accordingly.
2024-10-15 13:41:29 +02:00
Luca Cavanna b0170148a1
Forward port "Fix 9.12.0 backcompat break" to main (#13912)
* Fix 9.12.0 backcompat break (Lucene 9.12.0 cannot read 9.11.x indices written with quantized HNSW, `Lucene99HnswScalarQuantizedVectorsFormat`) (#13874)

* carefully regenerate the int8_hnsw bwc indices so that they do in fact use Lucene99ScalarQuantizedVectorsFormat ... when running TestInt8HnswBackwardsCompatibility it now fails (as expected) on 9.11.0 and 9.11.1 bwc indices, but not on 9.10.0

* rename int8 -> int7 bwc tests since we are actually testing 7 bit quantization

* actually fix the bwc bug: only allow compress=true when bits is 7 or 8 in HNSW scalar quantization

* tidy

* Revert "rename int8 -> int7 bwc tests since we are actually testing 7 bit quantization"

This reverts commit eeb3f8a668.

* Reapply "rename int8 -> int7 bwc tests since we are actually testing 7 bit quantization"

This reverts commit 3487c4210b.

* #13880: add test to verify the int7 quantized indices are in fact using quantized vectors not float32

* bump 9.12.x version to 9.12.1 and add bwc indices for 9.12.0

* remove duplicate 9.12.0 Version constant

* revert changes to index.9.12.0-cfs.zip, index.9.12.0-nocfs.zip, sorted.9.12.0.zip

* remove unused bwc index

Closes #13867
Closes #13880

* int7 9.x goes unsupported

---------

Co-authored-by: Michael McCandless <mikemccand@apache.org>
2024-10-15 13:39:33 +02:00
expani1729 dad37c1089
Merge branch 'apache:main' into bpv21_main 2024-10-15 13:07:13 +05:30
Luca Cavanna 6e9c431f95 Add 10.0.1 section to CHANGES.txt 2024-10-14 22:09:25 +02:00
Luca Cavanna 282945998d Update year in copyright 2024-10-14 17:59:52 +02:00
Armin Braun d5d73d060c
Dry up EverythingEnum and BlockDocsEnum in Lucene912PostingsReader (#13901)
It's in the title, extracting shared parts across both classes.
Almost exclusively mechanical changes with the exception of the introduction
of an array summing util.
2024-10-14 17:29:20 +02:00
expani a090196cd1 Changed decoder for os.arch amd64 ( x86 processor ) 2024-10-14 18:40:38 +05:30
Shubham Chaudhary 286b59a2db
Try using Murmurhash 3 for bloom filters (#12868) 2024-10-14 15:08:18 +02:00
Luca Cavanna e94ef1f315 DOAP changes for release 10.0.0 2024-10-14 14:57:01 +02:00
Prudhvi Godithi ada7eda517
IndexOrDocValuesQuery in query highlighting (#13902)
Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>
2024-10-14 14:19:24 +02:00
expani fa34d4ead8 Added versions.lock for unit testing dependency in lucene-jmh module 2024-10-14 16:26:07 +05:30
expani 16c6c2b694 Added hybrid bit21 encoder 2024-10-14 14:42:13 +05:30
Nhat Nguyen 9d4bba3331
Avoid allocating liveDocs for no soft-deletes (#13895)
This is a continuation of #13588, where we avoided allocating liveDocs 
for segments that have the __soft_deletes field but no values in it.
However, that PR only addressed the reading side. This change fixes the
writing scenario with IndexWriter.

Relates #13588
2024-10-12 18:29:57 -07:00
Armin Braun 0368614d34
Dry up both the two ImpactsEnum Implementation ins Lucene912PostingsReader (#13892)
These two share a lot of code, in particular the impacts implementation is 100% identical.
We can save a lot of code and potentially some cycles for method invocations by
drying things up. The changes are just mechanical field movements with the following exceptions:

1. One of the two implementations was using a bytes ref builder, one a bytes ref for holding the
serialized impacts. The `BytesRef` variant is faster so I used that for both when extracting.
2. Some simple arithmetic simplifications around the levels that should be obvious.
3. Removed the the logic for an index without positions in `BlockImpactsPostingsEnum`, that was dead code,
we only set this thing up if there's positions.
2024-10-12 15:48:58 +02:00
Armin Braun 3ed1d1e96c
Lazy initialize ForDeltaUtil and ForUtil in Lucene912PostingsReader (#13885)
Lazy initialize these fields. They consume/cause a lot of memory/GC because they are
allocated frequently (~7% of all allocations in luceneutil's wikimedia medium run for me).
This does not cause any measurable slowdown as far as runtime is concerned and since these are not
even needed for all instances (in fact they are rarely used in the queries the benchmark explores)
save qutie a few CPU cycles for collecting and allocating them.
2024-10-12 12:42:29 +02:00
Armin Braun 48547f913c
Use RandomAccessInput instead of seeking in Lucene90DocValuesProducer (#13894)
We use manual seeking and reading instead of random access in this class.
That seems just unnecessarily complicated.
2024-10-12 10:31:51 +02:00
panguixin fa77d97c09
Remove broken .toArray from Long/CharObjectHashMap entirely (#13884) 2024-10-11 07:30:34 +02:00
Rene Groeschke 5f0d1fbd0c
Make generated archive files reproducible (#13835)
* Make generated archive files reproducible

This should ensure deterministic archive files and fix issues with changing checksums even
though the codebase has not changed
2024-10-10 11:49:41 +02:00
zhouhui ba72d2285d
Add reopen method in PerThreadPKLookup (#13596)
Co-authored-by: Adrien Grand <jpountz@gmail.com>
2024-10-10 10:30:24 +02:00