Inverse search

10 views
Skip to first unread message

Trond Helge Rolland

unread,
Apr 22, 2026, 8:01:42 AM (5 days ago) Apr 22
to ResourceSpace
I can't find anything in the documentation, hoping somebody here can point me in the right direction (or this will be another one to the "add this feature" stack). 

When searching for resources created by a specific user we use the !propertiescu:7 query to only see resources created by user with ref 7. Although we want to combine this with another query and see only resources not created by this user, so is there a way to invert this search? I can't seem to get any difference or results when using "!properties<>7" or similar syntax. 

Trond Helge Rolland

unread,
Apr 22, 2026, 8:36:24 AM (5 days ago) Apr 22
to ResourceSpace
After digging a bit through the source code I see the "properties" search parameters gets handled in row 1584 and downwards in include/search_functions.php where the cu part gets split up and put into a case switch resulting in this trigger
case "cu":
                        $propertiessql->sql .= $sql_filter_properties_and . " r.created_by = ?";
                        array_push($propertiessql->parameters, "i", $propertyval);
                        break;

So it looks like my "best" workaround would be to add a case like "ncu" or something similar that runs the almost exact same query but uses r.created_by <> ? instead. 

I suspect that is the best solution as I doubt this is something many else wants so I'm not going to suggest adding it to the codebase. 
Reply all
Reply to author
Forward
0 new messages