Skip to content

Feature Request: Support for Synonyms #538

@SethFalco

Description

@SethFalco

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions