{"action":"created","issue":{"url":"https://api.github.com/repos/DynamoDS/Dynamo/issues/5020","labels_url":"https://api.github.com/repos/DynamoDS/Dynamo/issues/5020/labels{/name}","comments_url":"https://api.github.com/repos/DynamoDS/Dynamo/issues/5020/comments","events_url":"https://api.github.com/repos/DynamoDS/Dynamo/issues/5020/events","html_url":"https://github.com/DynamoDS/Dynamo/pull/5020","id":98177684,"number":5020,"title":"4-letter search words","user":{"login":"aosyatnik","id":8158404,"avatar_url":"https://avatars.githubusercontent.com/u/8158404?v=3","gravatar_id":"","url":"https://api.github.com/users/aosyatnik","html_url":"https://github.com/aosyatnik","followers_url":"https://api.github.com/users/aosyatnik/followers","following_url":"https://api.github.com/users/aosyatnik/following{/other_user}","gists_url":"https://api.github.com/users/aosyatnik/gists{/gist_id}","starred_url":"https://api.github.com/users/aosyatnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aosyatnik/subscriptions","organizations_url":"https://api.github.com/users/aosyatnik/orgs","repos_url":"https://api.github.com/users/aosyatnik/repos","events_url":"https://api.github.com/users/aosyatnik/events{/privacy}","received_events_url":"https://api.github.com/users/aosyatnik/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/DynamoDS/Dynamo/labels/PTAL","name":"PTAL","color":"207de5"}],"state":"open","locked":false,"assignee":{"login":"pboyer","id":916345,"avatar_url":"https://avatars.githubusercontent.com/u/916345?v=3","gravatar_id":"","url":"https://api.github.com/users/pboyer","html_url":"https://github.com/pboyer","followers_url":"https://api.github.com/users/pboyer/followers","following_url":"https://api.github.com/users/pboyer/following{/other_user}","gists_url":"https://api.github.com/users/pboyer/gists{/gist_id}","starred_url":"https://api.github.com/users/pboyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pboyer/subscriptions","organizations_url":"https://api.github.com/users/pboyer/orgs","repos_url":"https://api.github.com/users/pboyer/repos","events_url":"https://api.github.com/users/pboyer/events{/privacy}","received_events_url":"https://api.github.com/users/pboyer/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2015-07-30T14:03:13Z","updated_at":"2015-08-03T21:19:01Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/DynamoDS/Dynamo/pulls/5020","html_url":"https://github.com/DynamoDS/Dynamo/pull/5020","diff_url":"https://github.com/DynamoDS/Dynamo/pull/5020.diff","patch_url":"https://github.com/DynamoDS/Dynamo/pull/5020.patch"},"body":"### Purpose\r\n\r\nLink to YouTrack:\r\nMANG-7775 4-letter search terms like \"cubes\" and \"cones\" still return nothing in search\r\n\r\n#### Why does search give plural results in another order?\r\nE.g. if we search for \"cube\". We have next result:\r\n![image](https://cloud.githubusercontent.com/assets/8158404/8984038/9a601d5c-36d7-11e5-8776-559b2cba9b69.png)\r\n\r\nBut if we search for \"cubes\". We have the same results, but in another order:\r\n![image](https://cloud.githubusercontent.com/assets/8158404/8984051/b2aef0cc-36d7-11e5-81b5-b4100a042afa.png)\r\n\r\nThe answer is next:\r\nBoundingBox.ToCuboid has next search tags: `converttosolid,bb2cube,bb2cub,bounding tosolid,cubes`.\r\nCuboid.ByCorners has next search tags: `box,cube,byminmax,by corners,by points,cubes`.\r\n\r\nAs you can see ByCorners fully match for the word \"cube\", while ToCuboid doesn't have such search term. But if we search for the word \"cubes\", then both of them have such term. And since BoundingBox goes before Cuboid (B before C), it appears first in search.\r\n\r\n#### More flexible search\r\nSo, it's time to make our search more flexible. My proposal is to add for every search tag its' own weight. So that we could influence on node's place in search.\r\n\r\nI've added new xml tag - `<weights></weights>`. Now we can add to ZeroTouch nodes search tags with weights.\r\nE.g.\r\n```xml\r\n<member name=\"M:Autodesk.DesignScript.Geometry.BoundingBox.ToCuboid\">\r\n    <summary>\r\n             Get the BoundingBox as a Solid Cuboid\r\n    </summary>\r\n    <search>\r\n            converttosolid,bb2cube,bb2cub,bounding tosolid,cubes\r\n    </search>\r\n    <weights>\r\n            0.5,0.4,0.3,0.5,0.3\r\n    </weights>\r\n</member>\r\n```\r\nIf weight is not set, then by default it's set to 0.5 as it was before.\r\n\r\n### Declarations\r\n\r\nCheck these if you believe they are true\r\n\r\n- [x] The code base is in a better state after this PR\r\n- [x] The level of testing this PR includes is appropriate\r\n- [ ] User facing strings, if any, are extracted into `*.resx` files\r\n\r\n### Reviewers\r\n\r\n@Benglin \r\n\r\n### FYIs\r\n\r\n@pboyer \r\n\r\n### For QA\r\nHi, @lillismith and @jnealb .\r\nThere is one thing, that still looks meaningless for me.\r\n\r\nIf we search for \"arc\". We get Arc nodes like: ByThreePoints, ByBestTroughPoints, ByFillet etc. After Geometry nodes there are Math nodes like: Acos, Asin, Atan etc. That's ok, because these nodes have next search tags: `arcsin`, `arccosine` and `arctangent`. But I don't see any reason why we should add them to plural search result!\r\n\r\nThe same thing for \"face\" and \"faces\". If we search for \"face\", we get: Face.Edges and Face.Vertices. If we search for \"faces\", we get: PolySurface.SurFACES. And in my opinion this is right search result. If we search of singular - we get Face. If we search for plural - we get PolySurface. This sounds more reasonable, then return the same results.\r\n\r\nSo, what I meant to say: please, look one more time though singular/plural results and think  which of them do we really need?"},"comment":{"url":"https://api.github.com/repos/DynamoDS/Dynamo/issues/comments/127408679","html_url":"https://github.com/DynamoDS/Dynamo/pull/5020#issuecomment-127408679","issue_url":"https://api.github.com/repos/DynamoDS/Dynamo/issues/5020","id":127408679,"user":{"login":"pboyer","id":916345,"avatar_url":"https://avatars.githubusercontent.com/u/916345?v=3","gravatar_id":"","url":"https://api.github.com/users/pboyer","html_url":"https://github.com/pboyer","followers_url":"https://api.github.com/users/pboyer/followers","following_url":"https://api.github.com/users/pboyer/following{/other_user}","gists_url":"https://api.github.com/users/pboyer/gists{/gist_id}","starred_url":"https://api.github.com/users/pboyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pboyer/subscriptions","organizations_url":"https://api.github.com/users/pboyer/orgs","repos_url":"https://api.github.com/users/pboyer/repos","events_url":"https://api.github.com/users/pboyer/events{/privacy}","received_events_url":"https://api.github.com/users/pboyer/received_events","type":"User","site_admin":false},"created_at":"2015-08-03T21:19:01Z","updated_at":"2015-08-03T21:19:01Z","body":"@Benglin @aosyatnik @lillismith,\r\n\r\nThese PR's worry me a lot because they feel like spot fixes. How do we verify that this test is \"better\" than the last? We need a way of quantifying this information.\r\n\r\nI'm hesitant to merge this without hatching a plan for how to approach this. I'll return to this tomorrow."}}