improve search results

This commit is contained in:
Daniel Klabbers 2022-02-14 16:51:55 +01:00
parent 133ded0684
commit ccfb964aff
1 changed files with 4 additions and 4 deletions

View File

@ -249,14 +249,14 @@ class SearchController extends ListDiscussionsController
->add(
BoolQuery::create()
->add(TermQuery::create('type', 'discussions'), 'filter')
->add($query->boost($boost * .6)),
->add($query->boost($boost * 1.2)),
'should'
)
// Post bodies
->add(
BoolQuery::create()
->add(TermQuery::create('type', 'posts'), 'filter')
->add($query->boost($boost * .5)),
->add($query->boost($boost * 1.1)),
'should'
);
}
@ -270,14 +270,14 @@ class SearchController extends ListDiscussionsController
->add(
BoolQuery::create()
->add(TermQuery::create('type', 'discussions'), 'filter')
->add($query->boost(.3)),
->add(clone $query->boost(2)),
'should'
)
// Post bodies
->add(
BoolQuery::create()
->add(TermQuery::create('type', 'posts'), 'filter')
->add($query->boost(.2)),
->add(clone $query->boost(1.3)),
'should'
);
}