Skip to content

Commit

Permalink
API-334: fix query type
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdan-rosianu committed Dec 9, 2024
1 parent 268dd11 commit 45e703f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/elastic/src/entities/query.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down Expand Up @@ -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);
};
}

0 comments on commit 45e703f

Please sign in to comment.