Elasticsearch vs OpenSearch: source lines of code compared

This page compares the source lines of code (SLOC) of elastic/elasticsearch and opensearch-project/OpenSearch using cached OctoCounts reports. Code size is not code quality: a larger count only means more source material, not a better or worse project.

As of 2026-09-10, elastic/elasticsearch contains 4,300,837 total lines (3,091,605 code) across 21,945 files, while opensearch-project/OpenSearch contains 1,935,089 total lines (1,179,852 code) across 10,502 files as of 2026-08-26. elastic/elasticsearch is about 2.6x the size of opensearch-project/OpenSearch by code lines. Code size is not code quality: a larger count only means more source material, not a better or worse project.

Metricelastic/elasticsearchopensearch-project/OpenSearch
Files21,94510,502
Total lines4,300,8371,935,089
Code lines3,091,6051,179,852
Comment lines728,395524,946
Blank lines480,837230,291
Languages counted1212

Top languages in elastic/elasticsearch: Java (91.0% of code), C Header (4.1% of code), JSON (2.1% of code). Top languages in opensearch-project/OpenSearch: Java (91.9% of code), Rust (6.3% of code), JSON (1.0% of code). Java, JSON, YAML appear in both top language lists; C Header, C++ appear only in elastic/elasticsearch's top languages; Rust, Groovy appear only in opensearch-project/OpenSearch's top languages.

Methodology: both counts come from cached OctoCounts reports generated with tokei. elastic/elasticsearch was counted at ref main (commit 657b990d6944) on 2026-09-10; opensearch-project/OpenSearch was counted at ref main (commit 93dab5c08383) on 2026-08-26. See the counting methodology for ignored directories and analysis options.

Evidence and next steps:

Note: code size is not code quality. OctoCounts only reports reproducible line counts and makes no claim that either project is better.

Compare FAQ

Which has more lines of code, elastic/elasticsearch or opensearch-project/OpenSearch?

elastic/elasticsearch has more code: 3,091,605 code lines versus 1,179,852 for opensearch-project/OpenSearch, about 2.6x as much, based on cached OctoCounts reports as of 2026-09-10.

Does more source lines of code mean more complexity?

Not necessarily. SLOC measures size, not complexity, quality, or maintainability. A larger codebase can mean more features, more generated or vendored code, more verbose language idioms, or more tests — none of which imply the code is harder to work with. Use SLOC to gauge the scale of what you'd be reading or maintaining, not as a quality signal for elastic/elasticsearch, opensearch-project/OpenSearch, or any repository.

How is this comparison calculated?

Methodology: both counts come from cached OctoCounts reports generated with tokei. elastic/elasticsearch was counted at ref main (commit 657b990d6944) on 2026-09-10; opensearch-project/OpenSearch was counted at ref main (commit 93dab5c08383) on 2026-08-26. See the counting methodology for ignored directories and analysis options.

Can I compare a different branch, tag, or commit?

Yes. This page shows the default branch for each repository. Use the interactive comparison tool to pick any public GitHub repository, branch, tag, or commit SHA for both sides and get a fresh side-by-side report.