Commit Graph

36934 Commits

Author SHA1 Message Date
Shubham Chaudhary 4628327af0
Make TaskExecutor cx public and use TaskExecutor for concurrent HNSW graph build (#12799)
Make the TaskExecutor public which is currently pkg-private. At indexing time we concurrently create the hnsw graph (Concurrent HNSW Merge #12660). We could use the TaskExecutor implementation to do this for us.
Use TaskExecutor#invokeAll in HnswConcurrentMergeBuilder#build to run the workers concurrently.
2023-11-21 17:24:01 +01:00
Dzung Bui 4309917215
Remove FSTReader.size() (#12802)
* Move size() to FSTStore

* Remove size() completely

---------

Co-authored-by: Michael McCandless <mikemccand@apache.org>
2023-11-21 08:05:41 -05:00
Dzung Bui d0e0f6090e
Simplify BytesStore operation (#12814)
* Simplify BytesStore operations

* remove writeInt()
2023-11-21 07:26:47 -05:00
Evgeniy Mustafin 4991e3a1f4
Fix PayloadFilteredTermIntervalsSource equals (#12827)
Co-authored-by: Evgeniy Mustafin <evmustafin@ozon.ru>
2023-11-21 05:31:17 -05:00
Peter Gromov c23b3b3301
hunspell: a couple micro-optimizations to speed up dictionary loading (#12825)
* hunspell: a couple micro-optimizations to speed up dictionary loading

1. sort by the whole entry without searching for separators first: WordStorage doesn't require strong lexicographic order (only something close to it), and the separators are anyway before any usual word characters
2. avoid stream overhead when adding an entry
2023-11-21 08:05:42 +01:00
Mike McCandless 7eb8f6ee00 #12542, #12735, #12695, #12709, #12816: move CHANGES.txt entry from 10.0 -> 9.9.0 on bulk backport of recent FST improvements 2023-11-20 14:08:31 -05:00
Stefan Vodita 9de0936a7f
Fix off-by-one error in SimpleSortedSetFacetsExample (#12818) 2023-11-20 16:48:36 +00:00
Zhang Chao d0f63ec530
Use group-varint encoding for the tail of postings (#12782)
Co-authored-by: Adrien Grand <jpountz@gmail.com>
2023-11-20 11:06:13 +01:00
Adrien Grand 194a500323 Fix test failure on empty paged bytes. 2023-11-20 09:23:26 +01:00
Jakub Slowinski b3ef869681
Adding HumanReadableQuery with a descrition param, used for debugging print output (#12816) 2023-11-18 08:21:19 +01:00
Adrien Grand 48e234d988
Remove delayed seek optimization. (#12815)
I think that this optimization was introduced because `advanceShallow` may
advance skip lists and then never decode a block of postings. But actually
`IndexInput#seek` is cheap, including on `NIOFSDirectory`. So let's seek
immediately?
2023-11-18 08:11:07 +01:00
Shibi Balamurugan 6db09131d6
Fix segmentInfos replace doesn't set userData (#12626) 2023-11-17 18:53:05 +01:00
Michael McCandless de820b67cc
Fix CheckIndex to detect major corruption with old (not the latest) commit point (#12530)
* #7820: add initial (failing) test case exposing the bug in CheckIndex

* #7820: initial fix to CheckIndex to detect 'on load' corruption of older segments files

* exclamation point police

* tidy

* add missing @Override in new test case

* fold feedback: merge SIS-loading logic into single for-loop; rename sis -> lastCommit

* tidy

* sidestep segments.gen file as well in case we are reading very old index

* tidy

* always load last commit point first so if it has an issue that will not be masked by issues with older commit points
2023-11-17 12:50:39 -05:00
Jeff Zemerick c228e4bb66
GITHUB#11277, LUCENE-10241: Upgrade to OpenNLP to 1.9.4. (#448) 2023-11-17 15:51:31 +00:00
Benjamin Trent a26a80c89c
Simple rename of unreleased quantization parameter (#12811) 2023-11-15 15:00:12 -05:00
Benjamin Trent 05a336ea69
Utilize exact kNN search when gathering k > numVectors in a segment (#12806)
When requesting for k >= numVectors, it doesn't make sense to go through the HNSW graph. Even without a user supplied filter, we should not explore the HNSW graph if it contains fewer than k vectors.

One scenario where we may still explore the graph if k >= numVectors is when not every document has a vector and there are deleted docs. But, this commit significantly improves things regardless.
2023-11-15 12:56:15 -05:00
Adrien Grand 5afc17d4b5
Close all files when hitting an I/O exception with vectors. (#12807)
This was found by `testRandomExceptions()`: if an exception occurs when opening
the meta file, then the `rawVectorsReader` that is passed to the constructor
never gets closed.
2023-11-15 08:42:08 +01:00
Adrien Grand a13a4224d8 New attempt at addressing testHasUncommittedChanges() failures. 2023-11-14 23:11:54 +01:00
Uwe Schindler b45c21f9db
Fix errorprone with alternative runtime (#12808) 2023-11-14 22:56:55 +01:00
Michael McCandless 1ebee9e611
Remove angry errant lurking semicolons (#12805)
* remove angry errant lurking semicolons

* tidy

* #12805: woops, put back ; from autogen'd QueryParser.java
2023-11-14 12:34:46 -05:00
Alan Woodward dd46971ba6 Add CHANGES entry for #12801 2023-11-14 14:28:18 +00:00
Davis Cook 72dbfb7cf2
fix large p99 match request latency when purgeCache is running (#12801)
Prevent contention on the ReentrantReadWriteLock at search time by
ensuring that `commit` and `purgeCache` are never both trying to
hold the write lock.
2023-11-14 13:58:05 +00:00
Mike McCandless 63759a463d #12715: remove deprecated FSTCompiler constructor since this is an experimental/internal API 2023-11-14 08:35:46 -05:00
Juan Manuel Caicedo Carvajal df07febfe8
Deprecated public constructor of FSTCompiler in favor of the Builder. (#12715)
* Deprecated public constructor of FSTCompiler in favor of the Builder.

* Updated javadoc and added entry to CHANGES.txt
2023-11-14 08:30:04 -05:00
Mike McCandless cc35e90355 remove another errant lurking angry semicolon -- why do I keep finding these? 2023-11-14 07:07:52 -05:00
zhouhui 27c8e3f13f
Add downloading binutils instructions for the macos. (#12804) 2023-11-14 05:51:51 -05:00
Greg Miller 117e8d3435
Ensure DrillSidewaysScorer calls LeafCollector#finish on all sideways-dim FacetsCollectors (#12640) 2023-11-13 16:35:53 -08:00
Dzung Bui 1999353d9e
Copy directly between 2 ByteBlockPool to avoid double-copy (#12786)
* Copy directly between 2 ByteBlockPool to avoid double-copy

* add a comment on the start address

* Add unit test for NodeHash

* tidy code
2023-11-13 12:35:37 -05:00
Jakub Slowinski fcf6878144
javadocs cleanup in Lucene99PostingsFormat (#12776)
Addressing the last comments from https://github.com/apache/lucene/pull/12741
2023-11-13 11:07:21 -05:00
Shubham Chaudhary be27303e3a
Minor change to IndexOrDocValuesQuery#toString (#12791) 2023-11-13 10:01:32 -05:00
Stefan Vodita a70432c110
[Minor] Improvements to slice pools (#12795)
1. Remove rest method used only in tests.
2. Update Javadocs.
3. Make interleaved slices test a bit more evil by adding pool resets.
2023-11-13 09:42:01 -05:00
Mike McCandless 14196cfcf7 remove errant lurking semicolon 2023-11-13 08:26:50 -05:00
Chris Hegarty f2287e7ba6
Refactor the use of runFinalization in tests and benchmarks (#12768)
This commit refactors the usage of the deprecated System::runFinalization in tests and benchmarks, so that narrowly targeted suppressions can be added.
2023-11-13 10:21:53 +00:00
Adrien Grand 1930425ffa Tidy. 2023-11-13 10:23:19 +01:00
Adrien Grand c081cfa0ba Use a serial merge scheduler to avoid race conditions when checking for hasPendingMerges().
Closes #12763
2023-11-13 10:01:39 +01:00
Benjamin Trent 4e2ce76b3e Merge remote-tracking branch 'upstream/main' 2023-11-10 14:38:14 -05:00
Benjamin Trent fe0ccbd84a Fixing changes for GITHUB#12729 2023-11-10 14:37:56 -05:00
Patrick Zhai 72ec96b1d1
Fix NFAQuery in TestRegexpRandom2 (#12793) 2023-11-10 11:17:35 -08:00
Benjamin Trent a47ba3369f
Refactoring HNSW to use a new internal FlatVectorFormat (#12729)
Currently the HNSW codec does too many things, it not only indexes vectors, but stores them and determines how to store them given the vector type.

This PR extracts out the vector storage into a new format `Lucene99FlatVectorsFormat` and adds new base class called `FlatVectorsFormat`. This allows for some additional helper functions that allow an indexing codec (like HNSW) take advantage of the flat formats.

Additionally, this PR refactors the new `Lucene99ScalarQuantizedVectorsFormat` to be a `FlatVectorsFormat`.

Now, `Lucene99HnswVectorsFormat` is constructed with a `Lucene99FlatVectorsFormat` and a new `Lucene99HnswScalarQuantizedVectorsFormat` that uses `Lucene99ScalarQuantizedVectorsFormat`
2023-11-10 14:05:19 -05:00
Robert Muir c28d174cd7
script to run microbenchmarks across different ec2 instance types (#12787) 2023-11-10 12:31:10 -05:00
gf2121 d4583567e9
Cache buckets to speed up BytesRefHash#sort (#12784) 2023-11-10 16:13:41 +08:00
Patrick Zhai 904a994f66
Enable executing using NFA in RegexpQuery (#12767) 2023-11-09 23:12:42 -08:00
Egor Potemkin e1af4182d6
Fix random test TestDirectoryTaxonomyReader#TestDirectoryTaxonomyReader (#12790) 2023-11-09 14:08:44 -05:00
Uwe Schindler 41c19d8c7e Rename test to fit the name of MMapDirectory 2023-11-09 18:45:57 +01:00
Uwe Schindler 5b43384367
Redo #12707: Do not rely on isAlive() status of MemorySegment#Scope and make sure IndexInput#close() does not throw IllegalStateException and waits instead (#12785) 2023-11-09 18:40:10 +01:00
Mike McCandless 2cd66fb311 #12180: move CHANGES entry to 9.9.0 section 2023-11-09 10:36:43 -05:00
Egor Potemkin fb5f491643
Add TaxonomyReader#getBulkOrdinals method (#12180) (#12769) 2023-11-09 10:02:02 -05:00
Zhang Chao 570832eb74
Specialize arc store for continuous label in FST (#12748)
* init

* review fix and reuse duplicate code

* rebase

* tidy

* CHANGES.txt

* bump version

* rebase

* CHANGES.txt
2023-11-09 06:01:32 -05:00
Lu Xugang a71d64a598
Skip docs with Docvalues in NumericLeafComparator (#12405)
* Skip document by docValues

*When the queue is full with only one Comparator, we could better tune the maxValueAsBytes/minValueAsBytes. For instance, if the sort is ascending and bottom value is 5, we will use a range on [MIN_VALUE, 4].
---------

Co-authored-by: Adrien Grand <jpountz@gmail.com>
2023-11-09 13:05:28 +08:00
Stefan Vodita 8665014fa8
Clean up ordinal map in default SSDV reader state (#12454) 2023-11-08 17:07:22 -08:00