Methods
-
_getBrief(str, idx, }, size)
-
从原始字符串中截取子串附近的内容
Parameters:
Name Type Description str
String 原始字符串 idx
String 子串位置 }
Number queryLength 子串长度 size
Number 返回查询字符串前后临近文字的数量,前后共2*size -
_searchAll(str, q)
-
查询字符串中所有子串的位置
Parameters:
Name Type Description str
String 需要搜索的字符串 q
String 子串 -
_searchPost(post, query, size)
-
按文章内容查询
Parameters:
Name Type Description post
Object 文章 query
String 查询字符串 size
Number 返回查询字符串前后临近文字的数量,前后共2*size -
_setHexoInstance(hexo)
-
设置hexo
Parameters:
Name Type Description hexo
Hexo hexo实例 -
<async> search(q, size)
-
查询所有文章
Parameters:
Name Type Default Description q
String 查询字符串 size
Number 200 返回查询字符串前后临近文字的数量,前后共2*size