{"id":51633629,"url":"https://github.com/benwebber/protosearch","last_synced_at":"2026-07-13T11:03:57.680Z","repository":{"id":340898345,"uuid":"1154397067","full_name":"benwebber/protosearch","owner":"benwebber","description":"Compile protobuf messages to Elasticsearch mappings","archived":false,"fork":false,"pushed_at":"2026-02-27T02:08:35.000Z","size":732,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-27T09:39:45.797Z","etag":null,"topics":["elasticsearch","opensearch","protobuf","protobuf-plugin","protobufs","protoc-plugin"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/benwebber.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-10T10:43:11.000Z","updated_at":"2026-02-27T02:08:39.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/benwebber/protosearch","commit_stats":null,"previous_names":["benwebber/protosearch"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/benwebber/protosearch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benwebber%2Fprotosearch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benwebber%2Fprotosearch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benwebber%2Fprotosearch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benwebber%2Fprotosearch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benwebber","download_url":"https://codeload.github.com/benwebber/protosearch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benwebber%2Fprotosearch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35420325,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-13T02:00:06.543Z","response_time":119,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elasticsearch","opensearch","protobuf","protobuf-plugin","protobufs","protoc-plugin"],"created_at":"2026-07-13T11:03:56.914Z","updated_at":"2026-07-13T11:03:57.671Z","avatar_url":"https://github.com/benwebber.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# protosearch\n[![codecov](https://codecov.io/gh/benwebber/protosearch/graph/badge.svg?token=LDRVV0QNIK)](https://codecov.io/gh/benwebber/protosearch)\n\nCompile protobuf messages to Elasticsearch document mappings.\n\n## Example\n\nImagine you have a protobuf message representing a search document.\n\n```protobuf\nmessage Article {\n  message Author {\n    optional string uid = 1;\n    optional string name = 2;\n  }\n\n  optional string uid = 1;\n  optional string title = 2;\n  repeated Author authors = 3;\n}\n```\n\nAnnotate the message with `protosearch.field` options to map its fields to [mapping field types](https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/field-data-types).\n\n\n```protobuf\nimport \"protosearch/protosearch.proto\";\n\nmessage Article {\n  option (protosearch.index).mapping.dynamic = DYNAMIC_STRICT;\n\n  message Author {\n    string uid = 1 [(protosearch.field) = {}];\n    string name = 2 [(protosearch.field).mapping.type = \"text\"];\n  }\n\n  string uid = 1 [(protosearch.field) = {}];\n  string title = 2 [(protosearch.field).mapping = {\n    type: \"text\"\n    fields: {\n      key: \"en\"\n      value: {\n        type: \"text\"\n        analyzer: \"english\"\n      }\n    }\n  }];\n  repeated Author authors = 3 [\n    (protosearch.field).name = \"author\",\n    (protosearch.field).mapping.type = \"nested\",\n  ];\n}\n```\n\nThen use `protoc-gen-protosearch` to compile this to a document mapping:\n\n```\nprotoc -I proto/ --plugin=protoc-gen-protosearch --protosearch_out=. proto/article.proto\n```\n\n```json\n{\n  \"dynamic\": \"strict\",\n  \"properties\": {\n    \"uid\": {\n      \"type\": \"keyword\"\n    },\n    \"title\": {\n      \"type\": \"text\",\n      \"fields\": {\n        \"en\": {\n          \"type\": \"text\",\n          \"analyzer\": \"english\"\n        }\n      }\n    },\n    \"author\": {\n      \"type\": \"nested\",\n      \"properties\": {\n        \"uid\": {\n          \"type\": \"keyword\"\n        },\n        \"name\": {\n          \"type\": \"text\"\n        }\n      }\n    }\n  }\n}\n```\n\n## Install\n\n1. Download [latest release](https://github.com/benwebber/protosearch/releases) of the plugin for your system, or build from source.\n2. Install `protoc-gen-protosearch` to your `$PATH`.\n3. Copy [`protosearch/protosearch.proto`](proto/protosearch/protosearch.proto) to your Protobuf path.\n\n## Documentation\n\nSee the [reference documentation](doc/reference.md).\n\n## Example\n\nSee the [example project](example).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenwebber%2Fprotosearch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenwebber%2Fprotosearch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenwebber%2Fprotosearch/lists"}