/**
* OpenSearch QueryBuilder for basic filters.
*
* It supports the following cases:
*
* 1. **Top-level fields**
* Generates either a `term`, `terms` (for arrays), or a `range` query.
* Examples:
* { field: "variantCategory", value: "small" }
* { field: "variantCategory", value: ["cnv", "structural"] }
* { field: "start", value: { lte: 1 } }
*
* 2. **Indexed nested fields**
* Fields indexed as nested objects in OpenSearch.
* Example: { field: "genes.genePanels.source", value: ["NGTD", "AWSD"] }
*
* 3. **Nested fields that are not entirely indexed as nested**
* Allows overriding the nesting level through `nestedPath` in `queryConfig`. In case nestedPath is null, the field is treated as top-level.
* Example: { field: "reportEvents.vendorSpecificScores.rank", value: { lte: 1 }, queryConfig: { nestedPath: "reportEvents" } }
*
* 4. **Fields that imply additional underlying query terms**
* Uses `requiredTerm` in `queryConfig` to inject another QueryTerm.
* Example: { field: "reportEvents.vendorSpecificScores.rank", value: { lte: 1 }, queryConfig: { nestedPath: "reportEvents", requiredTerm: { field: "reportEvents.interpretationService", value: "Exomiser" } } }
*
* By default, the injected `requiredTerm` inherits the host filter's `nestedPath` AND
* `groupConfig` (so it joins the same group/scope as its host), unless the requiredTerm
* explicitly sets its own `nestedPath` and/or `groupConfig`.
*
* 5. **Special-case fields with ad-hoc render (exceptionTerms())**
* Example: { field: "size", value: { lte: 1 } }
*
* 6. **Group-level boolean operators (root and nested)**
* Use `queryConfig.groupConfig` to group filters into a named branch, decide how members of
* that branch combine (`bool`), and optionally cluster several branches together with
* `clusterKey` so they combine as siblings (typically OR'd) at a specific scope.
*
* -...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.