2017-05-04 215 views

回答

0

当您设置您的选项时,请设置详细信息true。这会将匹配的分数和匹配的键记录到控制台。

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);