-
Notifications
You must be signed in to change notification settings - Fork 50
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
term frequency and multi highlighting #19
Comments
is it already possible to have multi match highlighting using this internal interOr flag? @leeoniya I tried to use it and resulted in a crash with use of .toLowerCase on undefined |
@leeoniya Any update on this? What work is left to be done in order to have multi match highlighting? |
the internals rely on 1:1 mapping between needle terms and matched parts in the haystack items, and this is unlikely to change. probably the best i can do is to expose the internal in terms of integrating with |
this might be more in the realm of a document search, but could be interesting to explore.
in info() or search() use a sticky regex to walk each matched haystack item with an altenation group, track frequency and have that somehow feed into sort(). also compute all highlight ranges.
also can establish some convention for haystack item parts, like heading|summary|content|footer, and ranges can be relative to partition points.
not sure how far this is worth taking. scope creep is a thing to keep in check.
The text was updated successfully, but these errors were encountered: