I'm using SimpleSearch 1.6.1 (latest) and MODX 2.2.8.
My call looks like this:
[[!SimpleSearch?&tpl=`[[+searchResultsContainer:default=`searchresult`]]`&containerTpl=`searchresults`&ids=`[[+site]]`&exclude=`[[*search.exclude]]`]]
*search.exclude is a comma-separted list of IDs to exclude, as the documentation states.
It doesn't work, because although the code in /components/simplesearch/model/simplesearch/driver/simplesearchdriverbasic.class.php builds a "NOT IN" clause based on the id values passed in "exclude", those same ids are also in the "IN" clause (because they are child resources on the site I am trying to search).
I'm not sure whether the fact that the "IN" clause comes *after* the "NOT IN" clause in the query makes a difference - and if it does, I'm not sure how one would go about fixing that order in the xpdo query object. HOWEVER... I'm pretty sure that what *should* be happening here is to *remove* those "exclude" resources from the "IN" clause, rather than building a separate "NOT IN" clause that may conflict.
Now, how do I go about doing something about this? Do I just fork SimpleSearch in github and submit a pull request?