improve search results
This commit is contained in:
parent
133ded0684
commit
ccfb964aff
|
|
@ -249,14 +249,14 @@ class SearchController extends ListDiscussionsController
|
||||||
->add(
|
->add(
|
||||||
BoolQuery::create()
|
BoolQuery::create()
|
||||||
->add(TermQuery::create('type', 'discussions'), 'filter')
|
->add(TermQuery::create('type', 'discussions'), 'filter')
|
||||||
->add($query->boost($boost * .6)),
|
->add($query->boost($boost * 1.2)),
|
||||||
'should'
|
'should'
|
||||||
)
|
)
|
||||||
// Post bodies
|
// Post bodies
|
||||||
->add(
|
->add(
|
||||||
BoolQuery::create()
|
BoolQuery::create()
|
||||||
->add(TermQuery::create('type', 'posts'), 'filter')
|
->add(TermQuery::create('type', 'posts'), 'filter')
|
||||||
->add($query->boost($boost * .5)),
|
->add($query->boost($boost * 1.1)),
|
||||||
'should'
|
'should'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -270,14 +270,14 @@ class SearchController extends ListDiscussionsController
|
||||||
->add(
|
->add(
|
||||||
BoolQuery::create()
|
BoolQuery::create()
|
||||||
->add(TermQuery::create('type', 'discussions'), 'filter')
|
->add(TermQuery::create('type', 'discussions'), 'filter')
|
||||||
->add($query->boost(.3)),
|
->add(clone $query->boost(2)),
|
||||||
'should'
|
'should'
|
||||||
)
|
)
|
||||||
// Post bodies
|
// Post bodies
|
||||||
->add(
|
->add(
|
||||||
BoolQuery::create()
|
BoolQuery::create()
|
||||||
->add(TermQuery::create('type', 'posts'), 'filter')
|
->add(TermQuery::create('type', 'posts'), 'filter')
|
||||||
->add($query->boost(.2)),
|
->add(clone $query->boost(1.3)),
|
||||||
'should'
|
'should'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue