Commit Graph

37074 Commits

Author SHA1 Message Date
Benjamin Trent 7da509b708
Prevent humongous allocations when calculating scalar quantiles (#13090)
The initial release of scalar quantization would periodically create a humongous allocation, which can put unwarranted pressure on the GC & on the heap usage as a whole.

This commit adjusts this by only allocating a float array of 20*dimensions and averaging the discovered quantiles from there. 

Why does this work?

 - Quantiles based on confidence intervals are (generally) unbiased and doing an average gives statistically good results
 - The selector algorithm scales linearly, so the cost is just about the same
 - We need to do more than `1` vector at a time to prevent extreme confidence intervals interacting strangely with edge cases
2024-02-08 15:56:37 -05:00
Benjamin Trent 860a097ab3
Moving quantization logic to make future quantizer work simpler (#13091) 2024-02-08 09:38:07 -05:00
Stefan Vodita f339e24e8e
Index arbitrary fields in taxonomy docs (#12337) 2024-02-08 11:02:12 +00:00
Christine Poerschke bff5ac0ed0
in BytesRefHash constructor avoid duplicate BytesStartArray.bytesUsed() call (#13032) 2024-02-08 09:02:40 +01:00
Benjamin Trent e5bceb4086
Fix TestTopFieldCollector.testTotalHits #13080 (#13081) 2024-02-07 12:55:55 -05:00
Benjamin Trent 810e43c58a
Fix test failure TestParentBlockJoinFloatKnnVectorQuery.testSkewedIndex (#13082) 2024-02-07 12:55:43 -05:00
Zhang Chao 5e3e7465c3
Do not use mock merge policy for TestFuzzyQuery#testFuzziness (#13070) 2024-02-07 18:05:32 +01:00
Zhang Chao ce0fa2a6a6
Fix NPE in TestReqOptSumScorer.testFilterRandomRareOpt #13069 2024-02-07 13:14:01 +01:00
Dawid Weiss 8c2c276c6c Modify getEnWikiRandomLines to fetch and decompress the zstd resource #13083 2024-02-06 22:08:09 +01:00
Benjamin Trent 681fa21665
Fix knn vector visit limit fence post error (#13058)
I noticed while experimenting with brute-force search that our visitation limit is EXACTLY the number of filtered docs to hit. Consequently, if we happen to do brute force search and visit that exact number of vectors, we will fall back again to do brute-force a second time. This struck me as weird.

This commit adjusts the visit limit threshold for approximate search to account for this.
2024-02-06 12:37:12 -05:00
Mayya Sharipova d095ed02a2
Speedup concurrent multi-segment HNWS graph search (#12962)
Speedup concurrent multi-segment HNWS graph search by exchanging 
the global top candidated collected so far across segments. These global top 
candidates set the minimum threshold that new candidates need to pass
 to be considered. This allows earlier stopping for segments that don't have 
good candidates.
2024-02-06 09:16:06 -05:00
Dawid Weiss 635d09001a
Make date parsing more flexible for linedocsfile (europarl, enwiki) (#13075) 2024-02-05 19:04:07 +01:00
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
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
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