How to set weight on custom Search field
-
I want to find out those post first which having search keyword in title and then in content. any help?
$searchfield = ‘title^2 content^1’;
$dismax = $query->getDisMax();
// Set the fields to query, and their relative weights
$dismax->setQueryFields($searchfield);
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘How to set weight on custom Search field’ is closed to new replies.