allo-media/elm-es-simple-query-string/1.0.0

NOTE: the latest version is 4.0.0

Elastic.Expression

Elastic Expression

Expr can help you to define kind of syntax like And, Or, ....

Definition

type Expr
= And Expr Expr
| Exact String
| Exclude Expr
| Or Expr Expr
| Prefix String
| Word String

An Expr Type represent all AST's branchs

type AST
    = And AST AST
    | Or AST AST
    | Exclude AST
    | Exact String
    | Word String
    | Prefix String

In our case, to follow the production rules AST will be Expr

type Expr
    = And Expr Expr
    | Exact String
    | Exclude Expr
    | Or Expr Expr
    | Prefix String
    | Word String