2017-05-04 62 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);