Closed nikku closed 5 days ago
I added the sr
script to the top comment, and am looking into this right now.
While searching for the start of the word works better with this PR, the exact match with spaces is moved down:
This PR:
Current:
I can reproduce https://github.com/camunda/camunda-modeler/pull/4711#issuecomment-2491044304 in this PR too.
@barmac Thanks for your tests! I think we get to something reasonable, one test at a time. Check my latest updates on this branch out or the following capture that shows this is fixed: We now score tokens by length, too, to prioritize longest matches. Also we de-prioritize non-matches:
Great improvement
Test via
npx @bpmn-io/sr bpmn-io/bpmn-js -l bpmn-io/diagram-js#search-start
Proposed Changes
This prioritizes start of term and exact matches more aggressively.
This yields more substantial results in large popup (append) menus:
This yields better search results when querying larger data pools, where exact matches would otherwise de-prioritized:
Related to https://github.com/camunda/camunda-modeler/issues/4122, https://github.com/camunda/camunda-modeler/issues/3439.
Checklist
To ensure you provided everything we need to look at your PR:
@bpmn-io/sr
toolCloses {LINK_TO_ISSUE}
orRelated to {LINK_TO_ISSUE}