mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix alignments...
This commit is contained in:
parent
ff4eac55e2
commit
5e8fc080f0
@ -360,29 +360,29 @@ var Search = {
|
|||||||
* search for full-text terms in the index
|
* search for full-text terms in the index
|
||||||
*/
|
*/
|
||||||
performTermsSearch : function(searchterms, excluded, terms, titleterms) {
|
performTermsSearch : function(searchterms, excluded, terms, titleterms) {
|
||||||
var filenames = this._index.filenames;
|
var filenames = this._index.filenames;
|
||||||
var titles = this._index.titles;
|
var titles = this._index.titles;
|
||||||
|
|
||||||
var i, j, file, files;
|
var i, j, file, files;
|
||||||
var fileMap = {};
|
var fileMap = {};
|
||||||
var scoreMap = {};
|
var scoreMap = {};
|
||||||
var results = [];
|
var results = [];
|
||||||
|
|
||||||
// perform the search on the required terms
|
// perform the search on the required terms
|
||||||
for (i = 0; i < searchterms.length; i++) {
|
for (i = 0; i < searchterms.length; i++) {
|
||||||
var word = searchterms[i];
|
var word = searchterms[i];
|
||||||
|
|
||||||
files = [];
|
files = [];
|
||||||
_files1 = terms[word];
|
_files1 = terms[word];
|
||||||
_files2 = titleterms[word];
|
_files2 = titleterms[word];
|
||||||
// no match but word was a required one
|
// no match but word was a required one
|
||||||
if (_files1 === undefined && _files2 === undefined) {
|
if (_files1 === undefined && _files2 === undefined) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// found search word in contents
|
// found search word in contents
|
||||||
if (_files1 !== undefined) {
|
if (_files1 !== undefined) {
|
||||||
if (_files1.length === undefined)
|
if (_files1.length === undefined)
|
||||||
_files1 = [_files1];
|
_files1 = [_files1];
|
||||||
files = files.concat(_files1);
|
files = files.concat(_files1);
|
||||||
|
|
||||||
// set score for the word in each file to Scorer.term
|
// set score for the word in each file to Scorer.term
|
||||||
|
Loading…
Reference in New Issue
Block a user