{"repo":"ahrefs/esgg","free":true,"listed":false,"github":"https://github.com/ahrefs/esgg","clone":"git clone https://github.com/ahrefs/esgg.git","description":"ElasticSearch Guided (code) Generator","language":"OCaml","stars":11,"topics":["ocaml","elasticsearch"],"license":"GPL-2.0","category":"data-pipelines","readme_excerpt":"ElasticSearch Guided (code) Generator Development Install dependencies with opam install --deps-only . Build with make Mapping esgg takes as an input an ES mapping (schema description) and actual query (with syntax for variables, described below). Often additional information is needed to map ES fields into proper OCaml types, this is achieved by attaching meta annotation object to the affected field (ES only supports meta at root level, so these annotations make it impossible to store extended mapping back into ES which is a pity), as follows: Supported meta attributes: - {\"list\":true} - property is an array (mapped to list ) - {\"list\":\"sometimes\"} - property is either an array or single element (mapped to json with custom ocaml module wrap that will need to be provided in scope) - {\"optional\": } - property may be missing (mapped to option ) - {\"ignore\":true} - skip property altogether - {\"fields default optional\":true} - any subfield may be missing (can be overriden by per-field optional:false ) - {\"repr\":\"int64\"} - override ES type , currently the only possible value is \"int64\" to ensure no bits are lost (by default long is mapped to OCaml int ) Host types mapping Generated code allows to use application types for any fields. This is achieved by referencing specific type for each field in generated code, instead of the primitive type from the mapping, allowing consumer of the code to map it onto custom type etc. For example the field hash in example above will have type Co","default_branch":null,"files":null,"tree":[],"storefront":"/r/ahrefs","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/ahrefs/esgg/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}