Accuracy suffix/prefix options
See original GitHub issueThis is feature request.
My case is simple: I perform search on prefixes of words in the index and so I would like to highlight only matches which are prefixes (not in the middle of word). Example:
query: “fix” text: “fix fixes prefix” result: “fix fixes prefix” “fix” in “prefix” is not highlighted because it is not prefix of “prefix” 😉
Solution: it is enough to support new value of ‘accuracy’ configuration option (I called it ‘prefix’) and support it with addition of following code to ‘createAccuracyRegExp(str)’ function:
case "prefix":
return "(^|\\s" + lsJoin + ")(" + str + ")";
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Easy guide to know whats a prefix and whats a suffix? - Reddit
Fairly new to the game and I see a lot of guides mentioning to look for certain items with open prefix and or...
Read more >Prefixes, and Suffixes: Words, Worksheets, & Activities
All the prefixes and suffixes worksheets you need: an evidence-based way to teach morphology of words and improve semantics in speech ...
Read more >Modifiers - Path of Exile Wiki - Fandom
May be randomized (such as prefixes, suffixes) or fixed (e.x. on unique items). ... modifiers such as #% increased Physical Damage, +# to...
Read more >Prefix/Suffix for Dimension Types (What's New in 2022)
Customize dimensions to meet your documentation needs by adding a prefix, suffix, or both to a dimension type.
Read more >Number formatters — number_format • scales
All formatters allow you to re- scale (multiplicatively), to round to specified accuracy , to add custom suffix and prefix and to specify...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@patrickf3139 You can see appropriate changes in my fork.
@julmot What you describe is exactly my use case - I have full-text search results and I want to highlight all matching prefixes (and only prefixes) of all words in the text (not one per line/div etc.). Note that this is similar and agrees with existing accuracy options - same approach to words, only matching logic is different:
@patrickf3139 I have my changes in local repository. If you are interested, I will fork the project and apply my changes.