You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by so...@apache.org on 2024/03/25 14:25:58 UTC
(lucene) branch main updated: Only check the knn specific options, if a vector dictionary source was provided. (#13163)
This is an automated email from the ASF dual-hosted git repository.
sokolov pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git
The following commit(s) were added to refs/heads/main by this push:
new d5ef6edf7f0 Only check the knn specific options, if a vector dictionary source was provided. (#13163)
d5ef6edf7f0 is described below
commit d5ef6edf7f0ea0df6275ffa39e23c05986e18948
Author: Tim Grein <ti...@elastic.co>
AuthorDate: Mon Mar 25 15:25:50 2024 +0100
Only check the knn specific options, if a vector dictionary source was provided. (#13163)
---
lucene/demo/src/java/org/apache/lucene/demo/IndexFiles.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lucene/demo/src/java/org/apache/lucene/demo/IndexFiles.java b/lucene/demo/src/java/org/apache/lucene/demo/IndexFiles.java
index 73e7eaf3e40..dca01f61254 100644
--- a/lucene/demo/src/java/org/apache/lucene/demo/IndexFiles.java
+++ b/lucene/demo/src/java/org/apache/lucene/demo/IndexFiles.java
@@ -28,6 +28,7 @@ import java.nio.file.Paths;
import java.nio.file.SimpleFileVisitor;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.Date;
+import java.util.Objects;
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.demo.knn.DemoEmbeddings;
@@ -175,7 +176,8 @@ public class IndexFiles implements AutoCloseable {
+ " documents in "
+ (end.getTime() - start.getTime())
+ " ms");
- if (reader.numDocs() > 100
+ if (Objects.isNull(vectorDictSource) == false
+ && reader.numDocs() > 100
&& vectorDictSize < 1_000_000
&& System.getProperty("smoketester") == null) {
throw new RuntimeException(