Limiting search results to current_user

I am pretty new to Rails and ES. I have a query that was working and now I want to limited the results to only the current_user but I am having trouble with what to include in my controller.

It doesn't like the where method - thanks for any help

@galleries = params[:q], where: {user_id:}

	def, user_id)
         query: {
           bool: {
             must: [{
              multi_match: {
                query: query,
                fields: ['name', 'memory', 'memory_date']
            filter: [{
              term: {"user_id" => user_id}

If you could reproduce it with a curl recreation that'd be easier.

Here, the query looks good.

But as we don't know your documents, your mapping, the exact queries, that's hard to say.