Skip to content

Commit

Permalink
Only check the knn specific options, if a vector dictionary source wa…
Browse files Browse the repository at this point in the history
…s provided. (#13163)
  • Loading branch information
timgrein authored and Michael Sokolov committed Mar 25, 2024
1 parent da0c8b5 commit 3d109bd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lucene/demo/src/java/org/apache/lucene/demo/IndexFiles.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
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;
Expand Down Expand Up @@ -175,7 +176,8 @@ public static void main(String[] args) throws Exception {
+ " 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(
Expand Down

0 comments on commit 3d109bd

Please sign in to comment.