dosaboy / searchkit

Apache License 2.0
1 stars 2 forks source link

SearchDef parameter "hint" has a confusing name #4

Open mustafakemalgilor opened 1 year ago

mustafakemalgilor commented 1 year ago

The SearchDef parameter "hint" is defined as an optional parameter with the following description:

optional pre-search term. If provided, this is expected to match in order for the main search to be executed

where the effects of the parameter are not that obvious when the description for the "hint" parameter is not read by the user downstream. The name "hint" suggests that it's optional, it'll help the SearchDef to do its' job better (e.g., performance optimization), and it's not necessary to provide the core functionality (i.e. the match result would be the same with/without the "hint" parameter), but it's definitely doing more than that.

The parameter may be better understood if we rename it to sth like "prefilter".