Rank a category name above an accidental substring in the palette #367
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge!367
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/palette-category-rank"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Typing the name of a device class did not find that class.
ontis this project's own word for fibre CPE, and it is also a substring ofController. So the first three results for ont were an Aruba 7210 Mobility Controller, an ExtremeCloud IQ Controller and an FL SWITCH 2008 — with every actual ONT behind them. modem led with three FRITZ!Box/Cradlepoint routers. olt put a Konica Minolta bizhub printer third.The cause was the ranking: any model substring scored 2, the category scored 4, so an accident of spelling outranked a name someone chose deliberately.
Tiers are now exact model → model prefix → category word → model substring → vendor+model → other field → all tokens, with a whole-word test on the raw string before folding, so
on-tstill meansontandmonitoris not anonthit.Measured on the same catalogue, before and after, with result counts unchanged (274 / 84 / 75) — only the order moved:
Same counts matters: the fix reorders, it does not filter, so nothing that was findable has become unreachable. Verified in a browser against the running server as well as in tests.
Nothing was made fuzzy — a transposed SKU still returns nothing and
mc-220lstill finds MC220L first.test/palette-category-rank.test.jscovers the synthetic shape of the bug, the word-boundary rule, prefix-above-category ordering, all eight real category names, and the anti-fuzzy guarantees. 87 suites, 4298 assertions.Typing the name of a device class did not find that class. 'ont' is this project's own word for fibre CPE, and it is also a substring of 'Controller', so the first three results for 'ont' were an Aruba 7210 Mobility Controller, an ExtremeCloud IQ Controller and an FL SWITCH 2008, with every actual ONT behind them. 'modem' led with three FRITZ!Box and Cradlepoint *routers*; 'olt' put a Konica Minolta bizhub printer third. The cause was the ranking itself: any model substring scored 2 and the category scored 4, so an accident of spelling outranked a name someone chose deliberately. The tiers are now exact model, model prefix, category word, model substring, vendor+model, other field, all tokens - with a whole-word test on the raw string before folding, so 'on-t' still means 'ont' and 'monitor' does not count as an 'ont' hit. Measured on the same catalogue, before and after, with the result counts unchanged (274 for 'ont', 84 for 'modem', 75 for 'olt') - only the order moved: ont before: 7210 Mobility Controller(host), ExtremeCloud IQ Controller(host), FL SWITCH 2008(switch) after: 411(ont), SDX611(ont), SDX 621(ont) modem before: FRITZ!Box 7590(router), E3000(router), R1900(router) after: S33(modem), SB8200(modem), CM8200(modem) olt before: UF-OLT-4(olt), UF-OLT(olt), bizhub C360i(printer) after: SDX 6312-4(olt), SDX 6320(olt), SDX 6330(olt) Same counts matters: the fix reorders, it does not filter, so nothing that used to be findable has become unreachable. Verified in a browser against the running server as well as in the tests. Nothing was made fuzzy. A transposed SKU still returns nothing, and 'mc-220l' still finds MC220L first. test/palette-category-rank.test.js covers the synthetic shape of the bug, the word-boundary rule, the prefix-above-category ordering, all eight real category names, and the anti-fuzzy guarantees. 87 suites, 4298 assertions.b9b899b1f90b07224fc1