Commit Graph

37179 Commits

Author SHA1 Message Date
Uwe Schindler 9ab84f4be2
LUCENE-10572: Add support for varhandles in native byte order (still randomized during tests) (#888) 2024-02-05 18:13:09 +01:00
Uwe Schindler e05285edcd Move changes entry and fix spelling (#13001) 2024-02-05 17:35:33 +01:00
Shubham Chaudhary 4b5917029f
Forbidden Thread.sleep API (#13001)
Co-authored-by: Shubham Chaudhary <cshbha@amazon.com>
2024-02-05 17:23:52 +01:00
Dzung Bui 63d4ba938f
Make FSTCompiler.compile() to only return the FSTMetadata (#12831)
* Make FSTCompiler.compile() to only return the FSTMetadata

* tidy code
2024-02-05 10:58:56 -05:00
Robert Muir 4ef0c044d7
update README.md for java 21 2024-02-05 10:43:02 -05:00
Zhang Chao c02f5473b2
Use growNoCopy in some places (#12951) 2024-02-04 17:32:19 +01:00
Dmitry Cherniachenko 9caeb9395d
Fix normalization in TeluguAnalyzer (#13059)
DecimalDigitFilter and IndicNormalizationFilter were mistakenly omitted.
2024-02-01 14:45:27 +01:00
Adrien Grand d4c0eaf9db Fix formatting of some CHANGES entries. 2024-02-01 14:40:07 +01:00
Johannes Fredén b537e1da27
Optimize counts on two clause term disjunctions (#13036)
Calculate count(clause1 OR clause2) as count(clause1)
+ count(clause2) - count(clause1 AND clause2)
2024-02-01 13:48:53 +01:00
Simon Willnauer 3d47a0d5c2
Fix broken loop in TestDocumentsWriterStallControl.assertState() (#13062)
The loop in assertState prematurely exists due to a broken break steament.

Closes #13061
2024-02-01 12:44:50 +01:00
ChrisHegarty 05b23abe92 Merge branch 'main' into java_21 2024-01-31 16:19:32 +00:00
Simon Willnauer ed826f26df Fix broken javadoc reference 2024-01-31 16:46:38 +01:00
Simon Willnauer 1a6932f0ea Ensure test is only run on the previous major
Relates to #13046
2024-01-31 16:11:17 +01:00
Simon Willnauer 8d9290ca36
Modernize BWC testing with parameterized tests (#13046)
This change modernizes the BWC tests to leverage RandomizedRunners Parameterized Tests that allow us to have more structured and hopefully more extendible BWC tests in the future. This change doesn't add any new tests but tries to make the ones we have more structured and support growth down the road.
Basically, every index type got it's own Test class that doesn't require to loop over all the indices in each test. Each test case is run with all versions specified. Several sanity checks are applied in the base class to make individual tests smaller and much easier to read.

Co-authored-by: Michael McCandless <lucene@mikemccandless.com>
Co-authored-by: Adrien Grand <jpountz@gmail.com>
2024-01-31 15:27:56 +01:00
Dmitry Cherniachenko 08e0f41fea
Clean up AnyQueryNode code (#13053) 2024-01-31 10:49:23 +01:00
Dmitry Cherniachenko 4f0bc4f35c
Make static final Set immutable (#13055): EnumSet.of() returns a mutable Set that should not be used for static final constants. 2024-01-30 11:53:42 +01:00
Uwe Schindler 6566e33ff1 add changes entry 2024-01-30 11:48:07 +01:00
Dmitry Cherniachenko 13ea880508
Align instanceof check with type cast (#13039) 2024-01-30 11:47:00 +01:00
Dmitry Cherniachenko 39c10a2929
Change `set.removeAll(list)` to `list.forEach(set::remove)` (#13052) 2024-01-30 11:39:15 +01:00
Dmitry Cherniachenko d988f91aba
Use orElseGet() to avoid unnecessary object allocation (#13048) 2024-01-30 00:15:56 +01:00
Dmitry Cherniachenko d69df16bf8
Replace `new HashSet<>(Arrays.asList())` with `EnumSet.of()` (#13051) 2024-01-30 00:14:28 +01:00
Dmitry Cherniachenko cbec94c153
Use String.isEmpty() instead of equals("") (#13050) 2024-01-30 00:14:10 +01:00
Dmitry Cherniachenko 97464ebfcb
Use String.indexOf(char) where possible (#13049) 2024-01-30 00:13:56 +01:00
Dmitry Cherniachenko 0c2802f37a
Use String.replace() instead of replaceAll() (#13047) 2024-01-30 00:13:43 +01:00
Dmitry Cherniachenko e3a6a4bd8f
Remove concatenation in String.format() calls (#13038) 2024-01-30 00:13:31 +01:00
ChrisHegarty 239b83fca5 Add back-compat indices for 9.9.2 2024-01-29 16:55:04 +00:00
ChrisHegarty 4e5b294726 Add bugfix version 9.9.2 2024-01-29 16:30:42 +00:00
ChrisHegarty c40ad6a065 DOAP changes for release 9.9.2 2024-01-29 15:27:35 +00:00
Shintaro Murakami 141413633f
Support getMaxScore of ConjunctionScorer for non top level scoring clause (#13043) 2024-01-29 14:07:09 +01:00
sabi0 21e545501e
Make use of null-checked variable (#13040) 2024-01-29 09:19:07 +01:00
sabi0 fe4631c8d2
Use short-circuit boolean expressions (#13042) 2024-01-29 09:16:40 +01:00
Shintaro Murakami 7832d3c9fe
Propagate topLevelScoringClause from QueryProfiler (#13031) 2024-01-29 09:11:42 +01:00
Adrien Grand 7d35ae4858
Propagate minimum competitive score in ReqOptSumScorer. (#13026)
If the required clause doesn't contribute scores, which typically happens if
the required clause is a `FILTER` clause, then the minimum competitive score
can be propagated directly to the optional clause.
2024-01-26 15:50:22 +01:00
Adrien Grand 082d318abd
Early exit range queries on non-matching segments. (#13033)
This change makes `PointRangeQuery` exit early when it knows that it doesn't
match a segment. In the case when this query is part of a conjunction, this
helps make sure `ScorerSupplier#get` doesn't get called on other required
clauses, which is sometimes an expensive operation (e.g. multi-term queries).

This is especially relevant for time-based data combined with
`LogByteSizePolicy`, which gives non-adjacent ranges of timestamps to each
segment, which in-turn increases the likelihood that some segments won't match
a range query at all.
2024-01-26 15:47:01 +01:00
Benjamin Trent fb5037f841
Do not use mock merge policy for TestGrouping (#13034) 2024-01-26 07:16:27 -05:00
Zhang Chao a9480316e2
Improve Javadoc for Lucene90StoredFieldsFormat (#12984) 2024-01-25 11:11:21 -05:00
ChrisHegarty 20ea551b95 Add 13014 to 9.9.2 changelist 2024-01-25 09:18:05 +00:00
Stefan Vodita 7552c5093f
Fix issues with chunked TaxonomyIndexArray (#13028)
Fix construction from index with multiple of chunk size ordinals.

Fix mutable post-refresh children array.
2024-01-25 07:53:14 +00:00
gf2121 d0098f8489
Rollback the tmp storage of BytesRefHash to -1 after sort (#13014) 2024-01-25 10:48:11 +08:00
Heemin Kim 3a205feb27
Fix bug in ShapeTestUtil (#12287)
boxPolygon and trianglePolygon only uses minX and minY value of give XY Rectangle which results in a polygon with points in single place. With this changes, both methods generate correct polygons.
2024-01-24 18:09:37 +00:00
Benjamin Trent f16007c3ec
Fix NPE when sampling for quantization in Lucene99HnswScalarQuantizedVectorsFormat (#13027)
When merging `Lucene99HnswScalarQuantizedVectorsFormat` a NPE is possible when deleted documents are present.

`ScalarQuantizer#fromVectors` doesn't take deleted documents into account. This means using `FloatVectorValues#size` may actually be larger than the actual size of live documents. Consequently, when iterating for sampling iteration too far is possible and an NPE will be thrown.
2024-01-23 07:54:32 -05:00
Stefan Vodita 3674e779cb
[Minor] Document operation costs for stale workflow (#13000) 2024-01-22 09:40:25 +00:00
Michael Froh 2a0b7f2056
Split taxonomy arrays across chunks (#12995)
Split taxonomy arrays across chunks

Taxonomy ordinals are added in an append-only way.
Instead of reallocating a single big array when loading new taxonomy
ordinals and copying all the values from the previous arrays over
individually, we can keep blocks of ordinals and reuse blocks from the
previous arrays.
2024-01-22 09:11:20 +00:00
Simon Willnauer 24d557a4f6
Run BWC indices generation code together with unittest (#13023)
This change runs the current BWC indices generation code together
with the unittest to catch issues with the generated indices earliy.
Each generation method runs a sanity check on the generated indices.
2024-01-19 15:47:01 +01:00
Simon Willnauer c661c88fc8
Fix BWC test generation after mondernizing LineDocFile (#13021)
The changes on #12929 broke the generation code for BWC indices
since they are expecting vertain fields created by LineDocFile.
Yet, this change adds some sanity checks that run with unittest to ensure
the BWC generation is at least readable with the current version.

Relates to #12929
2024-01-17 15:03:30 +01:00
Simon Willnauer 340d9d2f9c
Prevent parent field from added to existing index (#13016)
This change prevents users from adding a parent field to an existing index.
Parent field must be added before any documents are added to the index to
prevent documents without the parent field from being indexed and later
to be treated as child documents upon merge.

Relates to #12829
2024-01-16 10:53:43 +01:00
gf2121 ed7c78ce6d
LUCENE-10366: Override #readVInt and #readVLong for ByteBufferDataInput to avoid the abstraction confusion of #readByte. (#592) 2024-01-16 17:30:09 +08:00
Sreehari Guruprasad c746bea233
Fixed Field.java documentation to refer to new IntField/FloatField/LongField/DoubleField (#13012)
Co-authored-by: Harshitha-g-06 <harshitha.grs@gmail.com>

Closes #12125
2024-01-15 09:14:02 +01:00
Patrick Zhai d72686be94
Suppress SimpleTextCodec for VectorSimilarityQueryTestCase (#13010) 2024-01-14 20:00:10 -08:00
Adrien Grand e0daca1eb4
Make sure `DocumentsWriterPerThread#getAndLock` never returns `null` on a non-empty queue. (#12959)
Before this change, `DocumentsWriterPerThread#getAndLock` could sometimes
return `null` even though the queue was empty at no point in time. The
practical implication is that we can end up with more DWPTs in memory than
indexing threads, which, while not strictly a bug, may require doing more
merging than we'd like later on.

I ran luceneutil's `IndexGeonames` with this change, and
`DocumentsWriterPerThread#getAndLock` was not the main source of
contention.

Closes #12649 #12916
2024-01-12 16:21:01 +01:00