Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The search box misses some symbols #9198

Open
timotheecour opened this issue Oct 4, 2018 · 3 comments
Open

The search box misses some symbols #9198

timotheecour opened this issue Oct 4, 2018 · 3 comments
Labels
Documentation Generation Related to documentation generation (but not content).

Comments

@timotheecour
Copy link
Member

timotheecour commented Oct 4, 2018

image

it doesn't show strformat.fmt

EDIT multisync also doesn't show up

related but different issue:

@kaushalmodi
Copy link
Contributor

Summoning the fuzzysearch expert @rayman22201, please :)

@rayman22201
Copy link
Contributor

I am summoned lol. I don't think I will have much time until Saturday, but I will take a look as soon as I can.

@timotheecour timotheecour changed the title [docgen] The search box is not working on certain symbols, eg: fmt [docgen] The search box is not working on certain symbols, eg: fmt, multisync Oct 14, 2018
@timotheecour timotheecour changed the title [docgen] The search box is not working on certain symbols, eg: fmt, multisync [docgen] The search box doesn't find certain symbols, eg: fmt, multisync Oct 16, 2018
@rayman22201
Copy link
Contributor

Finally was able to debug this.
The issue here is that fmt doesn't match properly is because it gets too big of a penalty for not matching the module title. In this case "strformat"

I'm regretting the idea of allowing the module title to be part of the search. It seems to cause too many problems. Using a searchIndex.json as @timotheecour and I discussed in IRC is going to make this easier to fix.
https://irclogs.nim-lang.org/19-10-2018.html#20:28:33

see this debug output:

fuzzyMatch("fmt", "strformat: fmt(pattern: string): untyped") 
matching fmt
scoreState: StartMatch
score: 0
StrIndex: 0 (s)
patIndex: 0 (f)
scoreState: LeadingCharDiff
score: -3
StrIndex: 1 (t)
patIndex: 0 (f)
scoreState: LeadingCharDiff
score: -6
StrIndex: 2 (r)
patIndex: 0 (f)
scoreState: LeadingCharDiff
score: -9
StrIndex: 3 (f)
patIndex: 0 (f)
scoreState: CharMatch
score: -9
StrIndex: 4 (o)
patIndex: 1 (m)
scoreState: CharDiff
score: -10
StrIndex: 5 (r)
patIndex: 1 (m)
scoreState: CharDiff
score: -11
StrIndex: 6 (m)
patIndex: 1 (m)
scoreState: CharMatch
score: -11
StrIndex: 7 (a)
patIndex: 2 (t)
scoreState: CharDiff
score: -12
StrIndex: 8 (t)
patIndex: 2 (t)
(score: 0, matched: false)

@krux02 krux02 changed the title [docgen] The search box doesn't find certain symbols, eg: fmt, multisync The search box misses some symbols Oct 31, 2018
@krux02 krux02 added the Documentation Generation Related to documentation generation (but not content). label Oct 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Generation Related to documentation generation (but not content).
Projects
None yet
Development

No branches or pull requests

4 participants