Closed halukkaramete closed 2 years ago
The way I recommend to format entries as:
Entry: {
Name:"United States",
Synonym:["US","USA","America"],
DisplayHtml: "--code here--"
}
Then you index both name and synomyn. (Do not index html) Then the html is reserved for display.
You can look at keys and output_map options to help you in this.
https://github.com/jeancroy/FuzzySearch#collect-information-and-normalize
https://github.com/jeancroy/FuzzySearch#get-a-field-from-the-original-object
Is it possible to let fuzzy-search search items like
United States
<!--America-->
so the user can type America and match it but only see this in the search results:
United States
This way, we can add lots of helper keys or synonyms in HTML comments to help the search but not confuse the user with those helper words..
Think of it like this
user types "below" and you match "under" because of this: under
<!--below underneath -->
or user types "heaven" or "gardens of eden" and you match "paradise" because of this: paradise
<!--heaven, gardens of eden -->]
etc..