OK, add this step to your server action (checked the syntax this time, this should be correct)
This will append ‘%’ to the start and end of 2018 resulting in a variable with the value “%2018%”
Then in the custom query use that variable as the search element. May not work but worth a try.