Commit 7e49baee authored by Nacim Goura's avatar Nacim Goura

update list result

parent 43d77d05
...@@ -73,7 +73,7 @@ npm-bcrypt@0.9.3 ...@@ -73,7 +73,7 @@ npm-bcrypt@0.9.3
npm-mongo@2.2.24 npm-mongo@2.2.24
observe-sequence@1.0.16 observe-sequence@1.0.16
ordered-dict@1.0.9 ordered-dict@1.0.9
ostrio:cookies@2.2.1 ostrio:cookies@2.2.2
ostrio:files@1.8.0 ostrio:files@1.8.0
percolate:synced-cron@1.3.2 percolate:synced-cron@1.3.2
practicalmeteor:chai@2.1.0_1 practicalmeteor:chai@2.1.0_1
......
...@@ -11,7 +11,6 @@ export async function searchWebsite(data, userId) { ...@@ -11,7 +11,6 @@ export async function searchWebsite(data, userId) {
const search = new Search(userId); const search = new Search(userId);
try { try {
const results = await search.searchWebsite(data.searchTerm); const results = await search.searchWebsite(data.searchTerm);
console.log(results);
return { return {
total: results.hits.total, total: results.hits.total,
list: _.map(results.hits.hits, '_source'), list: _.map(results.hits.hits, '_source'),
......
...@@ -33,8 +33,8 @@ export default class Search { ...@@ -33,8 +33,8 @@ export default class Search {
fields: [ fields: [
'description.stemmed', 'description.stemmed',
'body.stemmed', 'body.stemmed',
'urlText.stemmed',
'title.stemmed', 'title.stemmed',
'html',
], ],
}, },
}, },
...@@ -44,19 +44,16 @@ export default class Search { ...@@ -44,19 +44,16 @@ export default class Search {
query: term, query: term,
fuzziness: 'AUTO', fuzziness: 'AUTO',
fields: [ fields: [
'body.stemmed',
'description', 'description',
'description.stemmed',
'urlText', 'urlText',
'urlText.stemmed',
'body', 'body',
'title', 'title',
'url', 'url',
'breadcrumb', 'breadcrumb',
'h1', 'h1',
'h2', 'h2',
'url',
'html', 'html',
'url',
], ],
}, },
}], }],
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
{{#if websiteResults}} {{#if websiteResults}}
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-12">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading text-center"> <div class="panel-heading text-center">
<h3 class="panel-title">Résultat de site</h3> <h3 class="panel-title">Résultat de site</h3>
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<div class="panel-body"> <div class="panel-body">
{{#each result in websiteResults.list}} {{#each result in websiteResults.list}}
<li> <li>
<a href="{{result.url}}" target="_blank">{{result.title}} ({{result.url}})</a> <a href="{{result.url}}" target="_blank"><b>{{result.title}}</b> <br>({{result.url}})</a>
</li> </li>
{{/each}} {{/each}}
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment