Elastic Cloud and Typescript?

Hi all, we are investigating the use of Elastic Cloud and additionally the use of App Search.

Our journey so far has been a bit bumpy, and I'm looking for opinions from folks already using the services in production. It seems the support for Typescript is often lacking or broken? The @elastic/enterprise-search nodeJS client has been in beta for quite a while now, even though other clients have been deprecated already.

Are you using Typescript with Elastic Cloud? In general, is it working for you? Is your experience a good one?

Thx in advance for opinions. Just looking for info to help decide if we keep going or abandon chasing this solution.

Hey @Troy_Farrell ,

I've done a little digging, and found that the reason the Typescript client hasn't moved out of Beta is simply that we don't currently have a dedicated someone on our Language Clients team to own this project right now. I was going to suggest that if you have any concrete issues with the client that you please file a github issue, but it seems that you already have! So thank you. :slight_smile:

While I try to track down a maintainer to help address the bug you've raised, I'll point out that there's no "magic" to any of our language clients. Enterprise Search just uses REST APIs with some pretty standard auth mechanisms. If it's easier, you can use your favorite REST library/framework to send your requests.

Alternatively, have you tried the App Search API Javascript client? I see that you've dropped a comment in there on the Typescript Support issue, but I don't believe that client has been officially deprecated yet.

Hi @Sean_Story, thanks for your response and looking into this.

The deprecated client I was referring to was this one @elastic/app-search-node. It refers people to the new client that is only in beta.

The Javascript client you refer to @elastic/app-search-javascript appears to be mature and not deprecated, but as the comments suggest, Typescript support is lacking.

Unfortunately, the typescript compilation issues we've reported about the beta client via support ticket were deemed a feature request, so I guess we will re-evaluate our options. Fork the beta client ourselves and work with it, roll our own wrapper around REST requests as you suggested, or defer adopting Enterprise Search App Search until it matures.

Unfortunately, the typescript compilation issues we've reported about the beta client via support ticket were deemed a feature request

IDK where that was decided or communicated, but I can tell you on my side that folks are working to figure out how we can ensure the client gets maintained. You may be interested to see that a PR is up to address the issue you filed: Fix imports in index.d.ts by sethmlarson · Pull Request #17 · elastic/enterprise-search-js · GitHub

Fork the beta client ourselves and work with it, roll our own wrapper around REST requests as you suggested, or defer adopting Enterprise Search App Search until it matures.

I'd encourage you to choose one of the former. While we don't have the perfect Typescript client right now, we also don't have a Golang client, or a Java client, or many other popular languages. But this doesn't mean that App Search itself is not mature, just that we don't have the available language expertise to build and maintain all the languages we wish we could.

App Search is a product that has been growing and maturing for years. It was part of swiftype.com before its acquisition, and was introduced into the Elastic stack with 7.6.0, over 3 years ago.

Thanks a lot @Sean_Story. I commented on the PR issue you referenced. Thanks for doing some digging and helping out.

It is good to hear that the AppSearch product should be solid even if the client is a bit rough around the edges.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.

The Elastic Enterprise Search NodeJS client is now Generally Available and it offers TypeScript bindings: @elastic/enterprise-search - npm

2 Likes

@Troy_Farrell, I want to call out that this discuss post had a large impact on getting the client pushed through the Beta phase. Thank you for raising this, and engaging with us, and helping all its future users. :slight_smile:

1 Like