Enhance string handling in similarity_search.c with input validation and memory management improvements; update test.js to utilize new SimilaritySearch class for index creation.
This commit is contained in:
5
test.js
5
test.js
@@ -2,7 +2,10 @@ const SimilaritySearch = require('./index');
|
||||
|
||||
// Create a test index with 500 strings
|
||||
console.log('Creating test index with 500 strings...');
|
||||
const index = SimilaritySearch.createTestIndex(500);
|
||||
const index = new SimilaritySearch();
|
||||
index.addString('bio bizz');
|
||||
index.addString('lightmix bizz btio substrate');
|
||||
index.addString('bizz bio mix light');
|
||||
console.log(`Index created with ${index.size()} strings`);
|
||||
|
||||
// Test queries to run
|
||||
|
||||
Reference in New Issue
Block a user