We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
searchEntryConfig
有的站点的搜索功能默认将搜索词语视为或而非和的关系集合,需要使用扩展语法(通常是包含 +keyword 和排除 -keyword)才能实现与其他站点匹配的搜索行为。如果不经过特殊处理,多关键词搜索将会匹配大量无关种子。
+keyword
-keyword
参照skipNonLatinCharacters,实现硬编码的解决方案,专门实现 key = key.replace(/\s+/g, " +")。或可定名为 useIncludeOperator(术语 operator 参照 Google 的用法)。
skipNonLatinCharacters
key = key.replace(/\s+/g, " +")
useIncludeOperator
{ "searchEntryConfig": { "useIncludeOperator": true } }
实现可扩展的方案,为 searchEntryConfig 提供正则替换 regex 的键(暂称 keyReplace),同样使用 String.prototype.replace():
keyReplace
String.prototype.replace()
{ "searchEntryConfig": { "keyReplace": { "\\s+": " +" // 从第二个词开始使用包含语法 } } }
我可以自己实现这个功能,不过还是要首先讨论方案。
The text was updated successfully, but these errors were encountered:
没有特殊处理的搜索词,含有大量无关结果: 使用 include operator:
Sorry, something went wrong.
searchEntryConfig.area
keyAutoMatch
No branches or pull requests
您的功能请求是否与问题有关? 请描述一下。
有的站点的搜索功能默认将搜索词语视为或而非和的关系集合,需要使用扩展语法(通常是包含
+keyword
和排除-keyword
)才能实现与其他站点匹配的搜索行为。如果不经过特殊处理,多关键词搜索将会匹配大量无关种子。描述你想要的解决方案
参照
skipNonLatinCharacters
,实现硬编码的解决方案,专门实现key = key.replace(/\s+/g, " +")
。或可定名为useIncludeOperator
(术语 operator 参照 Google 的用法)。描述您考虑过的替代方案
实现可扩展的方案,为
searchEntryConfig
提供正则替换 regex 的键(暂称keyReplace
),同样使用String.prototype.replace()
:其他附加信息
我可以自己实现这个功能,不过还是要首先讨论方案。
The text was updated successfully, but these errors were encountered: