@fc-components/es-query
v0.0.3
Published
kql to dsl
Downloads
96
Readme
KQL 转换成 DSL
使用
import { buildESQueryFromKuery, getQueryAST } from "@fc-components/es-query";
const kquery = 'http_host.*: logs AND (method.keyword: * OR @timestamp > 100) AND user:{ first: "Alice" and last: "White" }';
const queryAst = getQueryAST(kquery);
const query = buildESQueryFromKuery(kquery);
console.log("queryAst", queryAst);
console.log("query", query);