Only check the knn specific options, if a vector dictionary source was provided. (#13163)

This commit is contained in:
Tim Grein 2024-03-25 15:25:50 +01:00 committed by GitHub
parent 04f335ad79
commit d5ef6edf7f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -28,6 +28,7 @@ import java.nio.file.Paths;
import java.nio.file.SimpleFileVisitor; import java.nio.file.SimpleFileVisitor;
import java.nio.file.attribute.BasicFileAttributes; import java.nio.file.attribute.BasicFileAttributes;
import java.util.Date; import java.util.Date;
import java.util.Objects;
import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.standard.StandardAnalyzer; import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.demo.knn.DemoEmbeddings; import org.apache.lucene.demo.knn.DemoEmbeddings;
@ -175,7 +176,8 @@ public class IndexFiles implements AutoCloseable {
+ " documents in " + " documents in "
+ (end.getTime() - start.getTime()) + (end.getTime() - start.getTime())
+ " ms"); + " ms");
if (reader.numDocs() > 100 if (Objects.isNull(vectorDictSource) == false
&& reader.numDocs() > 100
&& vectorDictSize < 1_000_000 && vectorDictSize < 1_000_000
&& System.getProperty("smoketester") == null) { && System.getProperty("smoketester") == null) {
throw new RuntimeException( throw new RuntimeException(