Results Component not working: Result.id is undefined

I used the search-ui example "elasticsearch". Then I adjusted everything to the Elasticsearch setup I have (different fields and facets).
Mostly everything worked out fine. Except that when I actually get results the app crashes with the error "Uncaught TypeError: result.id is undefined".
Unlike the example my results have the field "uuid" instead of "id". I think that is the root of the problem. The

My code for "Results":

                bodyContent={
                  <Results
                    titleField="document.title"
                    urlField="document.url"
                    shouldTrackClickThrough={true}
                  />
                }

Is there a way to make it work with the field "uuid"?

I am really stuck at fixing this. Any help would be great :slight_smile:

You'll either need to add an id field to your result object (this is probably the easiest option), or customize the Result view to look for uuid instead of id: Reference UI - how to modify what's displayed (React newbie) - #2 by JasonStoltz

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