Change core and lib search commands to use fuzzy search #1193
+235
−121
Conversation
It seems like it's taking "fuzzy" a bit too far:
For example, I don't see what would give a match to "yun" in the "Windows 10 Iot Core" platform entry: Click to expand{
"name": "Microsoft",
"maintainer": "Microsoft.IoT",
"websiteURL": "https://github.com/ms-iot/iot-utilities/tree/master/IotCoreAppDeployment/ArduinoIde/",
"email": "[email protected]",
"help": {
"online": "http://developer.microsoft.com/en-us/windows/iot/IotCoreAppDeployment_ArduinoIde.htm"
},
"platforms": [
{
"name": "Windows 10 Iot Core",
"architecture": "win10",
"version": "1.0.0",
"category": "Contributed",
"help": {
"online": "http://developer.microsoft.com/en-us/windows/iot/IotCoreAppDeployment_ArduinoIde.htm"
},
"url": "https://github.com/ms-iot/iot-utilities/raw/master/IotCoreAppDeployment/ArduinoIde/release/win10_iotcore-1.0.0_ide-1.6.6.zip",
"archiveFileName": "win10_iotcore-1.0.0_ide-1.6.6.zip",
"checksum": "SHA-256:ed1b42b396217e242cd3a5b597ad5dad5957cb8117dd0f972376bafab7d8a0e5",
"size": "47325480",
"boards": [
{"name": "Windows 10 IoT Core"}
],
"toolsDependencies":[]
},
{
"name": "Windows 10 Iot Core",
"architecture": "win10",
"version": "1.1.0",
"category": "Contributed",
"help": {
"online": "http://developer.microsoft.com/en-us/windows/iot/IotCoreAppDeployment_ArduinoIde.htm"
},
"url": "https://github.com/ms-iot/iot-utilities/raw/master/IotCoreAppDeployment/ArduinoIde/release/win10_iotcore-1.1.0_ide-1.6.6.zip",
"archiveFileName": "win10_iotcore-1.1.0_ide-1.6.6.zip",
"checksum": "SHA-256:683dcb0a72e80b9d21117f6471e0860d8cc35cd9b86557ba6fd1ed255952413e",
"size": "48316890",
"boards": [
{"name": "Windows 10 IoT Core"}
],
"toolsDependencies":[]
},
{
"name": "Windows 10 Iot Core",
"architecture": "win10",
"version": "1.1.1",
"category": "Contributed",
"help": {
"online": "http://ms-iot.github.io/content/en-US/win10/IotCoreAppDeployment_ArduinoIde.htm"
},
"url": "https://github.com/ms-iot/iot-utilities/raw/master/IotCoreAppDeployment/ArduinoIde/release/win10_iotcore-1.1.1_ide-1.6.11.zip",
"archiveFileName": "win10_iotcore-1.1.1_ide-1.6.11.zip",
"checksum": "SHA-256:f455f2829164065faacde141b3c15604c51bb79b6874d55d1124c66aae372693",
"size": "48317624",
"boards": [
{"name": "Windows 10 IoT Core"}
],
"toolsDependencies":[]
},
{
"name": "Windows 10 Iot Core",
"architecture": "win10",
"version": "1.1.2",
"category": "Contributed",
"help": {
"online": "http://ms-iot.github.io/content/en-US/win10/IotCoreAppDeployment_ArduinoIde.htm"
},
"url": "https://github.com/ms-iot/iot-utilities/raw/master/IotCoreAppDeployment/ArduinoIde/release/win10_iotcore-1.1.2_ide-1.6.11.zip",
"archiveFileName": "win10_iotcore-1.1.2_ide-1.6.11.zip",
"checksum": "SHA-256:b1c9956b46f33bcebb7f500d29931b19ed4723c713ac0439681ea1fb172722d1",
"size": "48317648",
"boards": [
{"name": "Windows 10 IoT Core"}
],
"toolsDependencies":[]
}
],
"tools":[]
} |
@per1234 I tested this while in a chat with @silvanocerza and I got to the same conclusion. |
pulled |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Please check if the PR fulfills these requirements
before creating one)
UPGRADING.md
has been updated with a migration guide (for breaking changes)Enhances
core search
andlib search
commands and related gRPC interface functions by introducing fuzzy search.As of now
core search
andlib search
both do a plain text matching on several platforms or libraries parameters to find results, this required the user to write exactly a string that matched one of those parameters.This is frustrating since even a missing space or underscore would make the search fail.
For example calling
lib search
withArduino mkr iot carrier
orArduinomkriotcarrier
would never return the libraryArduino_MKRIoTCarrier
.Or calling
core search
withyun
instead ofyún
with the correct accent would never return thearduino:avr
platform.A fuzzy search is now done when calling
core search
andlib search
, this way the user won't be required to write exactly the string to search but it will manipulated to find matches. Accented chars are normalized, missing chars or typos are handled, and things like this. It's not magical but better than before.Now calling
lib search
withArduino mkr iot carrier
orArduinomkriotcarrier
will return the libraryArduino_MKRIoTCarrier
.Also calling
core search
withyun
without an accent will return thearduino:avr
platform.This also affects the gRPC interface.
Nope.
None.
See how to contribute