Using db column for elasticsearch contains query

I’m testing a combined query between elasticsearch and postgres.
Is it possible to use the db column (or sql clause) on contains function?

select * from localES.books a
cross join search_words b
where contains (a.topic_detail: (b.kword))


select * from localES.books
where contains (a.topic_detail: (select kword from search_words))

Anyway, 1st query will return an error because cross join is not supported.
If I can use these queries, it’s really helpful for me.