我已经安装了python文档generator-sphinx,并在其中发布了一些文章,最近我发表了一篇名为的文章股票筛选器
。
输入筛选
可以得到它。
股票筛选器
在搜索栏中输入文章的全名,为什么现在找不到?
我已经构建了一个狮身人面像项目,并使用压缩并上传了它的保管箱sample.7z
,您可以下载并将其安装在您的狮身人面像中,以重现该问题。
示例狮身人面像项目来重现该问题
It happens because 筛选
is indexed but 股票筛选器
isn't. This happens because 股票筛选器
is recognized as three different terms/words 股票
, 筛选
and器
.
The index exists only for these terms(single characters are ignored):
As the single characters are ignored, only would 股票
and 筛选
fetch you results.
EDIT
In _static\language_data.js
append the following code snippet at the end of the file:
function getAllSubstrings(str) {
var i, j, result = [];
for (i = 0; i < str.length; i++) {
for (j = i + 1; j < str.length + 1; j++) {
result.push(str.slice(i, j));
}
}
return result.sort(function(a, b){ return a.length - b.length;});
}
In _static\searchtools.js
insert the below code snippet above this commented code //console.debug('SEARCH: searching for:');
:
if(searchterms.length==1)
searchterms = getAllSubstrings(searchterms[0]);
Again, in _static\searchtools.js
in the function performTermsSearch
(this function should be around/at line 379)
// add support for partial matches
.if
情况word.length > 2
。word.length > 0
向下滚动一点。您会发现此评论// no match but word was a required one
。
删除正下方的if条件。
测试一下,应该可以工作:
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句