# elastic/elasticsearch SLOC report

> As of 2026-09-10 (commit 657b990d6944), elastic/elasticsearch contains 4,300,837 total lines: 3,091,605 code, 728,395 comments, 480,837 blank, across 21,945 files in 24 languages (top: Java 91.0%). Custom configuration (tests excluded, docs excluded, generated excluded). Counted with tokei via OctoCounts.

elastic/elasticsearch has 3,091,605 source lines of code out of 4,300,837 total lines across 21,945 files, counted from the main ref at commit 657b990d6944 by the OctoCounts tokei engine on 2026-09-10. The report is cached by commit, tokei version, and analysis options, so recounting the same revision returns exactly these numbers.

OctoCounts produced this report by resolving elastic/elasticsearch to commit 657b990d6944, downloading the repository source archive, and counting every source file with tokei, the open-source line counter written in Rust. The table below breaks the count down by programming language into files, total lines, code lines, comment lines, and blank lines, so the figures can be compared across languages and projects. Results are cached by commit, tokei version, and analysis options, so counting the same revision again reproduces exactly these numbers.

## Repository size insights

This is a very large codebase by counted code lines. Code represents 71.9% of all lines, comments represent 16.9%, and the repository averages 141 code lines per file. Java accounts for 91.0% of counted code.

| Language | Files | Lines | Code | Comments | Blanks |
| --- | ---: | ---: | ---: | ---: | ---: |
| Java | 19,519 | 3,804,539 | 2,812,818 | 558,977 | 432,744 |
| C Header | 7 | 188,453 | 127,773 | 45,926 | 14,754 |
| JSON | 965 | 65,388 | 65,377 | 0 | 11 |
| C++ | 31 | 74,527 | 51,755 | 16,045 | 6,727 |
| YAML | 232 | 13,548 | 10,683 | 2,083 | 782 |
| Groovy | 48 | 9,819 | 7,952 | 670 | 1,197 |
| XML | 12 | 6,963 | 6,802 | 106 | 55 |
| TOML | 11 | 5,205 | 3,673 | 1,006 | 526 |
| Shell | 15 | 2,076 | 1,292 | 535 | 249 |
| AsciiDoc | 17 | 1,734 | 1,280 | 21 | 433 |
| Batch | 24 | 656 | 516 | 2 | 138 |
| Dockerfile | 5 | 708 | 486 | 128 | 94 |

Top language (Java 91.0%). Generated at 2026-09-10T03:29:31.301743561+00:00. Canonical report: https://octocounts.com/github/elastic/elasticsearch

## Reproduce this report

[Reproduce this exact report and configuration](https://octocounts.com/github/elastic/elasticsearch/commit/657b990d69446bcd7dfc760b47f65ffd5d1c0774?analysis=%7B%22ignoredDirs%22%3A%5B%5D%2C%22ignoredLanguages%22%3A%5B%5D%2C%22profile%22%3A%22default%22%2C%22includeDocs%22%3Afalse%2C%22includeTests%22%3Afalse%2C%22includeGenerated%22%3Afalse%7D).

## Report FAQ

### How many lines of code does elastic/elasticsearch have?

elastic/elasticsearch has 4,300,837 total lines, including 3,091,605 code lines, 728,395 comment lines, and 480,837 blank lines.

### How was the elastic/elasticsearch line count measured?

OctoCounts resolved the public GitHub repository to commit 657b990d6944, downloaded the source archive, counted it with tokei, and cached the report by commit, tokei version, and analysis options.

### What commit was counted for elastic/elasticsearch?

This OctoCounts report was generated from main at commit 657b990d6944 on 2026-09-10T03:29:31.301743561+00:00.

## Similar repository reports

- [metasfresh/metasfresh](https://octocounts.com/github/metasfresh/metasfresh) — Java, 3,403,847 code lines
- [NationalSecurityAgency/ghidra](https://octocounts.com/github/NationalSecurityAgency/ghidra) — Java, 2,154,124 code lines
- [nationalsecurityagency/ghidra](https://octocounts.com/github/nationalsecurityagency/ghidra) — Java, 2,151,508 code lines
- [apache/Beam](https://octocounts.com/github/apache/Beam) — Java, 2,115,921 code lines
- [exteraless/exteraless](https://octocounts.com/github/exteraless/exteraless) — Java, 4,148,600 code lines
- [risin42/NagramX](https://octocounts.com/github/risin42/NagramX) — Java, 4,212,256 code lines

## Related OctoCounts pages

- [Recently analyzed repositories](https://octocounts.com/recent)
- [Popular SLOC reports](https://octocounts.com/popular)
- [Trending GitHub repositories](https://octocounts.com/trending)
- [Hall of Monoliths](https://octocounts.com/hall-of-monoliths)
- [MongoDB vs PostgreSQL](https://octocounts.com/compare/mongodb-vs-postgres)
- [Kubernetes vs Docker Compose](https://octocounts.com/compare/kubernetes-vs-docker-compose)
- [Kubernetes vs Terraform](https://octocounts.com/compare/kubernetes-vs-terraform)
- [GitHub SLOC counter guide](https://octocounts.com/docs/github-sloc-counter)
- [Counting methodology](https://octocounts.com/docs/methodology)
- [SLOC and code metrics glossary](https://octocounts.com/docs/glossary)
- [Original research: how filtering changes SLOC counts](https://octocounts.com/research)
- [OctoCounts API docs](https://octocounts.com/docs/api)
