Pārlūkot izejas kodu

fix: change default threshold

Sven 2 gadi atpakaļ
vecāks
revīzija
a9a1d58f26
2 mainītis faili ar 7 papildinājumiem un 7 dzēšanām
  1. 6 6
      README.md
  2. 1 1
      src/songMeta.ts

+ 6 - 6
README.md

@@ -59,10 +59,10 @@ All routes support gzip and deflate compression.
 > Use this optional parameter to change the response format from the default (`json`) to `xml`  
 > The structure of the XML data is similar to the shown JSON data.
 >   
-> `?threshold=0.7`  
-> This optional parameter can be used to change the fuzzy search threshold from the default of 0.7  
+> `?threshold=0.65`  
+> This optional parameter can be used to change the fuzzy search threshold from the default of 0.65  
 > It has to be between 0.0 and 1.0; the lower the number, the less results you'll get but the more accurate the top results will be.  
-> 0.7 is a good middle ground but depending on your use-case you might want to play around with this.
+> 0.65 is a good middle ground but depending on your use-case you might want to play around with this.
 >
 > <br>
 > 
@@ -175,10 +175,10 @@ All routes support gzip and deflate compression.
 > Use this optional parameter to change the response format from the default (`json`) to `xml`  
 > The structure of the XML data is similar to the shown JSON data.
 >   
-> `?threshold=0.7`  
-> This optional parameter can be used to change the fuzzy search threshold from the default of 0.7  
+> `?threshold=0.65`  
+> This optional parameter can be used to change the fuzzy search threshold from the default of 0.65  
 > It has to be between 0.0 and 1.0; the lower the number, the less results you'll get but the more accurate the top results will be.  
-> 0.7 is a good middle ground but depending on your use-case you might want to play around with this.
+> 0.65 is a good middle ground but depending on your use-case you might want to play around with this.
 >
 > <br>
 > 

+ 1 - 1
src/songMeta.ts

@@ -18,7 +18,7 @@ interface GetMetaResult {
     all: SongMeta[];
 }
 
-const defaultFuzzyThreshold = 0.7;
+const defaultFuzzyThreshold = 0.65;
 
 /**
  * Returns meta information about the top results of a search using the genius API