I'm using Weighted Search on a site and want to prevent the results from listing entries from certain sections.
Looking at the README.md suggests that this functionality has not been built into the plugin. However, does anyone have any experience of getting the plugin to only search in certain sections? Either through the {% set results %}
OR tweaking the plugin?
I've tried added .section('mysection')
to the {% set results %}
but this seems to break the search.
// Working
{% set query = craft.request.getParam('q') %}
{% set results = craft.weightedSearch.substringSearch(query) %}
// Not working
{% set query = craft.request.getParam('q') %}
{% set results = craft.weightedSearch.substringSearch(query).section('mysection') %}
Hoping someone else has managed this and I don't have to go back to the standard Craft search.
Thanks