37426 Commits

Author SHA1 Message Date
Jakub Slowinski
295c5d3576
GITHUB#13175: Stop double-checking priority queue inserts in some FacetCount classes (#13488)
* GITHUB#13175: Stop double-checking priority queue inserts

Removing 2 cases of bottomX optimizations where insertWithOverflow already handles the check.

Closes #13175

* Update CHANGES.txt

---------

Co-authored-by: Jakub Slowinski <jslowins@amazon.com>
2024-07-09 10:25:02 -04:00
Ignacio Vera
392ddc154f
Introduce TestLucene90DocValuesFormatVariableSkipInterval for testing docvalues skipper index (#13550)
this commit makes possible to configure dynamically the interval size for doc values skipperfor testing, and add a new 
test suite that changes the interval size randomly.
2024-07-09 15:46:15 +02:00
ChrisHegarty
4baaedaa67 Add link to OpenJDK JIRA issue for VectorUtil::xorBitCount 2024-07-09 12:17:21 +01:00
Patrick Zhai
ceb4539609
Refactor and javadoc update for KNN vector writer classes (#13548) 2024-07-08 13:04:27 -07:00
Chris Hegarty
3304b60c9c
Improve VectorUtil::xorBitCount perf on ARM (#13545)
This commit improves the performance of VectorUtil::xorBitCount on ARM by ~4x.

This change is effectively a workaround for the lack of vectorization of Long::bitCount on ARM.

On x64 there is no issue, the long variant of xorBitCount outperforms the int variant by ~15%.
2024-07-08 17:30:45 +01:00
Armin Braun
9e04cb9c41
Override single byte writes to OutputStreamIndexOutput to remove locking (#13543)
Single byte writes to BufferedOutputStream show up pretty hot in
indexing benchmarks. We can save the locking overhead introduced by
JEP374 by overriding and providing a no-lock fastpath.
2024-07-08 10:59:50 +02:00
Armin Braun
675772546c
Optimize MaxScoreBulkScorer (#13544)
Don't use Comparator.comparingDouble(...) in a hotish loop here, it
causes allocations that escape analysis is not able to remove.
=> lets just manually inline this to get predictable behavior and save
up to 0.5% of all allocations in some benchmark runs.
2024-07-08 10:53:26 +02:00
Armin Braun
2a8d328ab2
Replace AtomicLong with LongAdder in HitsThresholdChecker (#13546)
The value for the global count is incremented a lot more than it is
read, the space overhead of LongAdder seems irrelevant => lets use
LongAdder. The performance gain from using it is the higher the more
threads you use, but at 4 threads already very visible in benchmarks.
2024-07-08 10:52:28 +02:00
Armin Braun
62e08f5f4b
TaskExecutor should not fork unnecessarily (#13472)
When an executor is provided to the IndexSearcher constructor, the searcher now executes tasks on the thread that invoked a search as well as its configured executor. Users should reduce the executor's thread-count by
1 to retain the previous level of parallelism. Moreover, it is now possible to start searches from the same executor that is configured in the IndexSearcher without risk of deadlocking. A separate executor for starting searches is no longer required.

Previously, a separate executor was required to prevent deadlock, and all the tasks were offloaded to it unconditionally, wasting resources in some scenarios due to unnecessary forking, and the caller thread having to wait for all tasks to be completed anyways. it can now actively contribute to the execution as well.
2024-07-04 11:15:26 +02:00
Christine Poerschke
f4cd4b46fc
Lucene99HnswVectorsReader.search float-vs-byte variants: reduce code duplication (#13529)
* Lucene99HnswVectorsReader.search float-vs-byte variants: reduce code duplication

* action review feedback: use org.apache.lucene.util.IOSupplier
2024-07-01 17:32:04 +01:00
Christine Poerschke
0ad270d8b0
[Abstract]Knn[Byte|Float]VectorQuery tweaks: reduce duplicate method calls (#13528)
* reduce LeafReaderContext.reader()[.maxDoc()] calls in AbstractKnnVectorQuery.getLeafResults

* reduce IndexReader.leaves() calls in AbstractKnnVectorQuery.findSegmentStarts

* reduce LeafReaderContext.reader() calls in Knn(Byte|Float)VectorQuery.approximateSearch
2024-07-01 17:31:02 +01:00
zhouhui
3cd406e783
Remove unused segNo calculation in IndexWriter.doFlush (#13491) 2024-07-01 17:29:10 +01:00
Stefan Vodita
5f91d609ea
Make Gradle dashboard easy to find by adding a badge (#13476) 2024-07-01 09:09:51 +01:00
Benjamin Trent
19fe1a56f7
Fix more vector similarity query tests (#13530) 2024-06-29 13:54:32 -04:00
Adrien Grand
44ad4d95c6
Add bw tests for block-tree with inlined metadata. (#13527)
The backport of #13524 found a hole in the testing of `Lucene40BlockTreeTerms`
for versions before we moved metadata to its own file. This PR adds explicit bw
testing for this version. Adding the correct if/else statements made the code
extremely complicated so I opted for restoring the file as it was at the time
when we bumped the version.

This also fixes the bug that we introduced in #13524.
2024-06-28 21:29:00 +02:00
Ignacio Vera
f8ee339f64 Add back-compat indices for 9.11.1 2024-06-27 16:23:03 +02:00
Ignacio Vera
2aec233b5c Sync CHANGES for 9.11.1 2024-06-27 16:14:36 +02:00
Ignacio Vera
d47a5afc65 spotless 2024-06-27 16:08:48 +02:00
Ignacio Vera
803a743cd7 Add bugfix version 9.11.1 2024-06-27 16:02:56 +02:00
Ignacio Vera
b737c5f707 DOAP changes for release 9.11.1 2024-06-27 15:40:55 +02:00
Armin Braun
126834c09e
Reduce overhead for FSTs in FieldReader (#13524)
We don't need to clone the index input we hold on to in OffHeapFSTStore
since we only use it for slicing from known coordinates anyway.
-> remove the cloning and add the infrastructure to initialize
OffHeapFSTStore without seeking the input to the starting offset.
2024-06-27 09:52:10 +02:00
Armin Braun
33a4c1d8ef
Reduce memory use of MinimizationOperations#minimize (#13511)
It is relatively easy to consume a massive amount of memory
for the minimize operation, with its lists of boxed Integer (even though these are mostly cached,
it's still more than 4b per instance to store them instead of plain storage) and neverending
duplicate+empty StateList instances.
The boxed integer situation we can fix and probably speedup by using the hppc primitive collections.
To fix the duplicate/empty StateList instances, we can use a constant. This requires some hacky forking
on the write path but that's about it.
This is partly motivated by ES users at times creating broken, very long prefix queries that can then eat up
GBs of heap. With this change, the examples I've been looking at become about 6x cheaper heap wise, making it
less likely that kind of mistakes impacts stability.
2024-06-25 16:15:30 +02:00
zhouhui
3ae59a9809
Fix Method declared 'final' in 'final' class. (#13492) 2024-06-21 13:47:55 -04:00
Adrien Grand
cfbf8d93df
Honor read advice on compound files. (#13467)
This includes the following changes:
 - New `IndexInput#slice(String, long, long, ReadAdvice)` API that allows creating slices with different advices.
 - `PosixNativeAccess` now explicitly sets `MADV_NORMAL` when called with `ReadAdvice.NORMAL`. This is required to be able to override a `RANDOM` advice of a compound file with a `NORMAL` advice of a sub file of this compound file.
 - `PosixNativeAccess` now only ignores the first page if a range of bytes starts before the `MemorySegment` instead of the whole range.
2024-06-21 14:39:41 +02:00
Zack Kendall
06c4a4b9e0
Prevent DefaultPassageFormatter from taking shorter overlapping passages (#13384) 2024-06-21 10:57:59 +01:00
yadda yadda yadda
c7f4b8dee2
Fix NPE in StringValueFacetCounts over empty match-set (#13494) 2024-06-21 10:18:39 +01:00
Dawid Weiss
ab291210db Removed changes entry for #13315 entirely as it'll appear in 9.11.1 section, once released. 2024-06-20 16:49:55 +02:00
Dawid Weiss
2529075d48 Moved changes entry to 9.12 (with the possibility of backporting to 9.11.1) #13315 2024-06-20 16:41:11 +02:00
Stéphane Campinas
d453832bb8
Fix IndexOutOfBoundsException thrown in DefaultPassageFormatter by unordered matches (#13315) 2024-06-20 16:36:51 +02:00
zhouhui
057cbf3c86
Use getAndSet, getAndClear instead split operations. (#13507) 2024-06-19 11:53:12 +02:00
Greg Miller
937c004eda
Fix global score update bug in MultiLeafKnnCollector (#13463) 2024-06-18 18:34:15 -07:00
Dawid Weiss
7e31f56ea1 Add versions.toml to .gitattributes and normalize line endings to lf. #13484 2024-06-18 14:25:40 +02:00
Dawid Weiss
ff3fe75adb Add build-tools to smoke tester's expect list. #13484 2024-06-18 10:33:53 +02:00
Dawid Weiss
bff0b1daee Smoke tester should no longer expect versions.props and look for versions.toml instead. #13484 2024-06-18 10:17:38 +02:00
Dawid Weiss
04def26289 Smoke tester should no longer expect buildSrc at the top level. #13484 2024-06-18 09:57:19 +02:00
Dawid Weiss
676be86e8f Correct the default checksum for artifacts to be sha512. #13484 2024-06-18 09:43:29 +02:00
Michael Sokolov
27a3e71fa3 CHANGES entry for FlatVectorsFormat 2024-06-17 11:19:06 -04:00
Ignacio Vera
d29c57e50c
Fix backward codec test after introducing the doc values skip index (#13487)
The introduction of the doc values skip index in #13449 broke the backward codec test as those codecs do not support
 it. This commit fix it by breaking up the base class for the tests.
2024-06-17 09:58:12 +02:00
Dawid Weiss
dc287862dd
Gradle build: cleanup of dependency resolution and consolidation of dependency versions (#13484) 2024-06-17 09:49:21 +02:00
Stefan Vodita
8f50976c26
Don't preserve auxiliary buffer contents in LSBRadixSorter if it grows (#12947) 2024-06-15 18:36:21 +01:00
Michael Sokolov
487d24ae69
Expose FlatVectorsFormat (#13469) 2024-06-13 19:38:24 -04:00
Ignacio Vera
048770205c
GITHUB#13449: Sparse index, optional skip list on top of doc values (#13449)
Optional skip list on top of doc values which is exposed via the DocValuesSkipper abstraction. A new flag is 
added to FieldType.java that configures whether to create a "skip index" for doc values.

Co-authored-by: Adrien Grand <jpountz@gmail.com>
2024-06-13 10:17:50 +02:00
Pulkit Gupta
1c655823dd
Mark COSINE VectorSimilarity function as deprecated (#13473) 2024-06-11 13:49:21 -04:00
Benjamin Trent
cfdc747cde
Adjust assertion check to not throw an NPE (#13479) 2024-06-11 09:48:21 -04:00
Bruno Roustant
51e60f49f8 Add missing entry in changes.txt (#13431) 2024-06-11 14:10:09 +02:00
Bruno Roustant
4e8fb2a9df
Optimize Japanese UserDictionary. (#13431)
Replace TreeMap by a List of Match. Use compiled Pattern.
2024-06-11 10:02:58 +02:00
Michael Sokolov
edba83e636 equivocate about IntelliJ test runner 2024-06-10 08:40:38 -04:00
Dawid Weiss
06f86a5096
Silence odd test runner warnings after gradle upgrade (#13471) 2024-06-10 11:31:40 +02:00
Stefan Vodita
fb94403e0f Fix typo in SimpleSortedSetFacetsExample.java 2024-06-10 08:44:47 +00:00
Paul King
5e0f549185
Fix typo in StringValueFacetCountsExample.java (#13474) 2024-06-10 09:25:27 +01:00