You cannot use an instance of org.apache.lucene.search.Query with the Elasticsearch backend, no.
You can pass a query string with the Lucene syntax to Elasticsearch, though:
- either with the
simpleQueryStringpredicate (it offers a different syntax from your example) - or with a native Elasticsearch predicate where you’ll pass the JSON for the
queryStringquery. We will add an API for that predicate in Hibernate Search at some point, but that’s not implemented yet ([HSEARCH-4563] - Hibernate JIRA).
There is not, and there never will be. We tried that in Hibernate Search 5 and it was a nightmare to maintain. 0/10, won’t do it again.