How do I view all my data in a table instead of json

Hi @JasonStoltz I'm a newbie to react and I'm trying to view all my data in a table with column names instead of a json type formatted result in app search. I have looked into many blogs and I couldn't find an appropriate solution to this.. can you please help me understand how that can be done.

Thank you

Hi @phani2! Unfortunately, App Search does not support content types other than JSON right now. At the moment, I would recommend processing the JSON results to convert them to the format you need.

Best,
Brian

Hi @phani2, I just realized that this is more about Search UI than the return type of the data from the server.

Unfortunately, I don't believe Search UI supports a table view out of the box. You'll have to customize this yourself. The Customization: Component Views and HTML section may be a useful place to start. You will likely need to customize the Results and Result components.

We also welcome contributors to the project itself, if you'd like to open a pull request!

Best,
Brian

Hi, @Brian_McGue could you please be more specific on this

processing the JSON results

So if I had to change the results where do I exactly change in the react code of App search.
If you could help me on these lines it would be really helpful to me.

Thank you.

Here's another post where I talk a bit about customizing views: Reference UI - how to modify what's displayed (React newbie)

Also, see the "headless" example from the main page. You can access the raw array of results and do whatever you'd like with it: https://github.com/elastic/search-ui#creating-a-search-experience

<SearchProvider config={config}>
  <WithSearch
    mapContextToProps={({ results }) => ({
      results
    })}
  >
    {({ results }) => {
      return (
        <div>
          {results.map(r => (
            <div key={r.id.raw}>{r.title.raw}</div>
          ))}
        </div>
      );
    }}
  </WithSearch>
</SearchProvider>
1 Like

Thank you @JasonStoltz. Im also looking to perform okta integration with elastic app search.
could you please let me know the process of the same.

Thank you
Phani

Okta access for admins? You'd use SAML auth: https://www.elastic.co/guide/en/app-search/current/security-and-users.html#app-search-self-managed-security-and-user-management-elasticsearch-saml

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