Update README.md to enhance documentation on similarity metrics and usage. Add dependencies section and clarify return values for methods. Modify test.js to reflect updated search scenarios and improve clarity in search results.
This commit is contained in:
6
test.js
6
test.js
@@ -44,7 +44,7 @@ customIndex.addString('bizz bio mix light');
|
||||
customIndex.addStrings([
|
||||
'plant growth bio formula',
|
||||
'garden soil substrate',
|
||||
'plagron light mix',
|
||||
'plagron lightmix',
|
||||
'Anesia Seeds Imperium X Auto 10',
|
||||
'anesi'
|
||||
]);
|
||||
@@ -57,8 +57,8 @@ const results = customIndex.search('amnesia haze', 0.1);
|
||||
results.forEach(match => {
|
||||
console.log(` ${match.similarity.toFixed(2)}: ${match.string}`);
|
||||
});
|
||||
console.log('\nSearching with higher similarity threshold (0.1) for "lightmix":');
|
||||
const results2 = customIndex.search('lightmix', 0.1);
|
||||
console.log('\nSearching with higher similarity threshold (0.1) for "mix light":');
|
||||
const results2 = customIndex.search('mix light', 0.1);
|
||||
results2.forEach(match => {
|
||||
console.log(` ${match.similarity.toFixed(2)}: ${match.string}`);
|
||||
});
|
||||
Reference in New Issue
Block a user