Would it be feasible to add synonyms support when creating the index and searching on client-side?
I don't know how other tools like Elasticsearch implement this, but they also have the feature where certain terms can be treated as synonymous. For example, on my website I'd like if the terms styles and CSS were treated the same.
A search like inline styles should be equivalent to a search for inline CSS. And so a search for inline styles could show the page for inlining CSS.
Usage
The expectation is that this project would expose a config called synonyms, which has no default value. A developer can populate this property with a string[][].
Each string[] is a list of synonyms that are treated as identical terms when both indexing and searching content.
Workaround
Currently, I've worked around this by jumping between terms as I document pages. For example, I may refer to it as "inlining CSS", but then later refer to it as "inlining styles". Both terms are well understood by users, while usually making both terms searchable.
I'm willing to look into this myself, but any input or guidance would be appreciated as I haven't reviewed the code of this repository yet.
Would it be feasible to add synonyms support when creating the index and searching on client-side?
I don't know how other tools like Elasticsearch implement this, but they also have the feature where certain terms can be treated as synonymous. For example, on my website I'd like if the terms
stylesandCSSwere treated the same.A search like
inline stylesshould be equivalent to a search forinline CSS. And so a search forinline stylescould show the page for inlining CSS.Usage
The expectation is that this project would expose a config called
synonyms, which has no default value. A developer can populate this property with astring[][].Each
string[]is a list of synonyms that are treated as identical terms when both indexing and searching content.Workaround
Currently, I've worked around this by jumping between terms as I document pages. For example, I may refer to it as "inlining CSS", but then later refer to it as "inlining styles". Both terms are well understood by users, while usually making both terms searchable.
I'm willing to look into this myself, but any input or guidance would be appreciated as I haven't reviewed the code of this repository yet.