Skip to content

Commit

Permalink
feat: Make Query public to allow custom query extensions (#184)
Browse files Browse the repository at this point in the history
  • Loading branch information
juntezhang authored Sep 7, 2023
1 parent 58d2a8f commit 122cd79
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ declare namespace esb {
*
* @param {string} queryType
*/
class Query {
export class Query {
constructor(queryType: string);

/**
Expand Down
4 changes: 4 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const {
Rescore,
InnerHits,
SearchTemplate,
Query,
util: { constructorWrapper }
} = require('./core');

Expand Down Expand Up @@ -167,6 +168,9 @@ exports.requestBodySearch = constructorWrapper(RequestBodySearch);
/* ============ ============ ============ */
/* ============== Queries =============== */
/* ============ ============ ============ */
exports.Query = Query;
exports.query = constructorWrapper(Query);

exports.MatchAllQuery = MatchAllQuery;
exports.matchAllQuery = constructorWrapper(MatchAllQuery);

Expand Down

0 comments on commit 122cd79

Please sign in to comment.