Javascript 在对象数组中搜索的结果
我使用fuse.js在对象数组中搜索,比如 它返回标记匹配的整个项目。Javascript 在对象数组中搜索的结果,javascript,fuse.js,Javascript,Fuse.js,我使用fuse.js在对象数组中搜索,比如 它返回标记匹配的整个项目。 如何知道哪些标记匹配?设置选项时,请将详细设置为真实。这将使用匹配的键将匹配的分数记录到控制台 const options = { verbose: true, shouldSort: true, threshold: 0.6, location: 0, distance: 100, maxPatternLength: 32, minMatchCharLength: 1, keys: [
如何知道哪些标记匹配?设置选项时,请将详细设置为真实。这将使用匹配的键将匹配的分数记录到控制台
const options = {
verbose: true,
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author.firstName"
]
};
const fuse = new Fuse(list, options);