Search UI with GraphQL Server

I see that Search UI is meant to work with "any backend". Does this include a standard GraphQL server?

Also, can someone confirm the exact benefits over a search framework such as Search UI vs a UI library such as MUI or PrimeReact? They also contain form components which can be used for frontend search. Is it the more reactive features as a whole?

Hey @iany

You can build a custom connector to integrate a backend. Some documentation here to help you get started Building a custom connector | Elastic docs

The benefits are:

  • out of the box components that deal with common search use-case features like Search Input, autocomplete, facets, sorting and pagination that you would need to build on your own with MUI or primeReact
  • Search UI also maintains the state of the search to the components (what is the search term, filters, sorting, page). Something you would need to build on your own too

Hope this helps!
Joe

Thanks for the helpful information @joemcelroy.

If I had a search-based site but the search was fairly simple and the dataset fairly small would Search UI be overkill? The search fields are main select boxes (and multi-selects), radio buttons, and requires a button click to submit the search. It has a results pane and the results need to paginate with the URL bar updated to reflect the search options. I'm trying to determine how much I'd save by using a search framework over an API vs a UI framework in this case.

Thanks

Depends on your frontend experience but I would say it does sound like an overkill solution to use Search UI for your needs.

Thanks for the insight @joemcelroy. I think then I'll start with raw components and see if I can build the link-up functionality myself.

I take it that the benefits of using Search UI would mostly come down to the complexity of the search controls on the site rather than the size of the dataset?

Whilst Search UI has connector support, Search UI is still coupled to App Search paradigms. I would be surprised if you didn't encounter issues as you build your own connector on a very different API.

Yes I would say that is true also. If you just have a search input and results list then search ui isn't necessarily needed :slight_smile:

By build it myself, I mean just regular querying of an API and handling the response rather than build a connector for Search UI. Like you say, for simple search I think Search UI may be more than I need and would present its own challenges in integrating.

Thanks for the advice. Much appreciated.

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