Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import java.io.File;
import java.nio.charset.StandardCharsets;
import java.util.List;
import java.util.Objects;

@SpringBootApplication @EnableRedisEnhancedRepositories(basePackages = "com.redis.om.vss.*") public class RomsVectorSimilaritySearchApplication {
Logger logger = LoggerFactory.getLogger(RomsVectorSimilaritySearchApplication.class);
Expand All @@ -37,6 +38,7 @@ public static void main(String[] args) {
.stream() //
.limit(maxLines) //
.map(line -> Product.fromCSV(line, useLocalImages)) //
.filter(Objects::nonNull) //
.toList();
repository.saveAll(data);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ public static Product fromCSV(String line, boolean useLocalImages) {
String gender = values[1];
String masterCategory = values[2];
String subCategory = values[3];
if (subCategory.equalsIgnoreCase("Innerwear")) return null;
String articleType = values[4];
String baseColour = values[5];
String season = values[6];
Expand Down