diff --git a/packages/elastic/src/entities/query.type.ts b/packages/elastic/src/entities/query.type.ts index 61cfeb3a..413df670 100644 --- a/packages/elastic/src/entities/query.type.ts +++ b/packages/elastic/src/entities/query.type.ts @@ -10,6 +10,7 @@ import { ShouldQuery } from "./should.query"; import { WildcardQuery } from "./wildcard.query"; import { StringQuery } from "./string.query"; import { NestedShouldQuery } from "./nested.should.query"; +import { ScriptQuery } from "./script.query"; export class QueryType { static Match = (key: string, value: any | undefined, operator: QueryOperator | undefined = undefined): MatchQuery => { @@ -48,7 +49,7 @@ export class QueryType { return new StringQuery(key, value); }; - static Script = (key: string | string[], value: any | undefined): StringQuery => { - return new StringQuery(key, value); + static Script = (source: string): ScriptQuery => { + return new ScriptQuery(source); }; }