Skip to content

feat:implemented the elasticsearch stack for the search#111

Merged
Marve10s merged 3 commits intoMarve10s:mainfrom
Kavin-Bakyaraj:dev-kavin
Apr 2, 2026
Merged

feat:implemented the elasticsearch stack for the search#111
Marve10s merged 3 commits intoMarve10s:mainfrom
Kavin-Bakyaraj:dev-kavin

Conversation

@Kavin-Bakyaraj
Copy link
Copy Markdown

No description provided.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 31, 2026

@Kavin-Bakyaraj is attempting to deploy a commit to the Ibrahim's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Marve10s
Copy link
Copy Markdown
Owner

Hey! Thank you for the PR! Will take a closer look soon

@Marve10s
Copy link
Copy Markdown
Owner

Marve10s commented Apr 1, 2026

PR Review — Verified by Scaffolding + Type-Checking

I built the CLI from this branch, scaffolded real projects (elasticsearch + hono, elasticsearch + Next.js self, elasticsearch + express), installed dependencies, and ran tsc --noEmit on each.


3 Type Errors in search.ts.hbs

The generated search.ts fails type-checking with @elastic/elasticsearch@9.3.4 (resolved from the pinned ^9.1.0):

1. estypes.TypeMapping does not exist (line 182)

The correct type is MappingTypeMapping:

- mappings?: estypes.TypeMapping;
+ mappings?: estypes.MappingTypeMapping;

2. estypes.IndexSettings does not exist (line 183)

The correct type is IndicesIndexSettings:

- settings?: estypes.IndexSettings;
+ settings?: estypes.IndicesIndexSettings;

3. BulkResponseItem[] is not assignable from the SDK's actual return type (line 99/107)

The SDK returns Partial<Record<BulkOperationType, BulkResponseItem>>[], not BulkResponseItem[]:

- ): Promise<{ errors: boolean; items?: estypes.BulkResponseItem[] }> {
+ ): Promise<{ errors: boolean; items?: Partial<Record<estypes.BulkOperationType, estypes.BulkResponseItem>>[] }> {

What works well

  • Scaffolding: All three test projects (hono, self/Next.js, express) scaffold correctly with the elasticsearch search helper, dependency, and env vars in the right locations
  • self backend fix: This PR incidentally fixes a real bug — on main, self backends get the search dependency but no search.ts helper file. This fix benefits meilisearch and typesense too
  • Env vars: The 5 elasticsearch env vars (node, cloud ID, API key, username, password) are well-documented with clear comments
  • resolveConnection() logic: API key > basic auth > no auth priority, and Cloud ID > local node routing, are both correct
  • Tests: 16 combo tests plus file content assertions provide solid coverage
  • Web configurator: Icon, resource links, and constants are all properly wired

Minor notes

  • ~30% of the diff is auto-formatter line wrapping changes (option-metadata.ts, schemas.ts, constant.ts) — consider splitting those into a separate commit
  • PR body is empty — would be good to describe the feature and call out the self backend fix

Summary

Solid PR — just needs the 3 type fixes in the template and it should be good to go.

@Marve10s
Copy link
Copy Markdown
Owner

Marve10s commented Apr 1, 2026

Small errors in templates Claude was able to find. Otherwise PR is very solid, I'd like to merge this after the fix. Thank you a lot!

@Kavin-Bakyaraj
Copy link
Copy Markdown
Author

Small errors in templates Claude was able to find. Otherwise PR is very solid, I'd like to merge this after the fix. Thank you a lot!

sure, I will fix that ASAP

@Marve10s Marve10s merged commit d664ab1 into Marve10s:main Apr 2, 2026
5 of 6 checks passed
Marve10s added a commit that referenced this pull request Apr 2, 2026
PR #111 added the elasticsearch template but missed wiring it into
the SearchSchema enum and CLI interactive prompt.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants