Comments (3)
What's currently done today in the scoreKey field if there are multiple matches with the same score?
The first key in the keys
array wins, so maybe the same could be done with an array of strings.
from quick-score.
Thanks for the feedback! I was actually just thinking about matching against an array of strings, from a discussion in #11.
Would you expect the score for an array of strings to be highest score for any of the strings? The average?
Another complexity is returning which string matched. Not sure if that should be an index into the array or the actual string containing the match. It's also tricky if multiple strings have the same score.
"work added" would match the first result with a high score, when it should probably have a lower score if each label was considered separately.
Matching the "work added"
query against the individual strings would actually return 0
for each one, since neither contains all of those characters.
from quick-score.
Absolutely! Thanks for working on this library :)
Work you expect the score for an array of strings to be highest score for any of the strings? The average?
I think what would be ideal would be if the score matched the highest of the strings. We only use the score to sort the options, and in the case that there's a match to one of the elements in the array, we'd want to show it near the top.
Another complexity is returning which string matched. Not sure if that should be an index into the array or the actual string containing the match.
What fuse does is to return another field in the search result that corresponds to the full matched value. I guess the analogous field here would be a scoreValue
field to correspond to the current scoreKey
. Index would also work great for us, but I suspect the scoreValue
might be more elegant for general use cases.
It's also tricky if multiple strings have the same score.
Ah yes this might be tricky. In our use case, if multiple strings have the same score, having only one of them would be more than sufficient. What's currently done today in the scoreKey
field if there are multiple matches with the same score?
from quick-score.
Related Issues (17)
- Option to check similarity with unused/extraneous characters HOT 1
- [Feature request] Option to ignore dots in key names and to score all keys, without specifying a list HOT 10
- I just want to thank you for 0.12 release HOT 1
- Allow a threshold below which results are not returned HOT 2
- Odd behaviour in search sesults HOT 1
- Scores that are equal to minimumScore are excluded HOT 1
- Limit result HOT 1
- Would this project be open to using TypeScript? HOT 16
- `setKeys()` and `setItems()` do not support ArrayLike Iterables because they use `[].concat()` for a shallow copy HOT 3
- Results are no longer returned for searches beyond the first letter in our app with 0.1.0 HOT 12
- Question about original QuickSilver algorithim HOT 1
- Implement highlight for matches HOT 3
- Distribute as a JavaScript file? HOT 3
- quickScore is not defined HOT 3
- Can't use query long strings HOT 25
- Option to ignore accents (diacritics) HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quick-score.