diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2018-04-29 18:50:33 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2018-04-29 18:50:33 +0200 |
commit | 50a4e701cd5791b5400ca4c8b438b17baee351b0 (patch) | |
tree | 6db06916d47297c8cde3008f1fa80265066b7982 /search/elasticlunr/query_index | |
parent | e2bcd2fa26b04fd2ea246b1eb765b9b52e7324fa (diff) | |
download | www-andreasbaumann-cc-50a4e701cd5791b5400ca4c8b438b17baee351b0.tar.gz www-andreasbaumann-cc-50a4e701cd5791b5400ca4c8b438b17baee351b0.tar.bz2 |
replace google site search with an ElasticLunr search
Diffstat (limited to 'search/elasticlunr/query_index')
-rwxr-xr-x | search/elasticlunr/query_index | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/search/elasticlunr/query_index b/search/elasticlunr/query_index index 4630ab7..90f61e5 100755 --- a/search/elasticlunr/query_index +++ b/search/elasticlunr/query_index @@ -10,7 +10,7 @@ fs.readFile( './posts.index', 'utf8', function( err, data ) { } var index = elasticlunr.Index.load( JSON.parse( data ) ); console.log( 'Index loaded..' ); - var results = index.search( 'the', { fields: { title : { boost : 2}, content : { boost : 1 } } } ); + var results = index.search( 'the', { fields: { title : { boost : 2 }, content : { boost : 1 } } } ); for( var i = 0; i < results.length; i++ ) { console.log( i + ". " + results[i]['ref'] + " " + results[i]['doc']['title'] ); |