[Fixed]What shall i import (Java) for scriptQuery(Script)

In this code snippet :-

QueryBuilder qb = scriptQuery(
new Script("doc['num1'].value > 1")
);
Located here :- ScriptQuery

I'm getting :- "The method scriptQuery(Script) is undefined for the type App"
I have already imported :-
import org.elasticsearch.script.;
import org.elasticsearch.index.query.ScriptQueryBuilder.
;

Is there any other library to import?

Solved with :-

import static org.elasticsearch.index.query.QueryBuilders.scriptQuery;

//Fetched the info from github source code.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.