Hi,
I'm currently evaluating Elastic App Search. I have written a script that inserts that data, and then I generated and downloaded the Reference UI React code to query the data from my site. It works great, but I would like to get control over the output. For example one of the fields outputted in plain text is an image link I would like to use to actually show the image.
I have spent the whole day trying to figure out how to modify the App.js code to be able to do that, but I have now given up. Thing is that I'm totally new to React as well.
bodyContent={
}
So I would like to insert an tag which retrieve the url from one of the fields in the data I got from Elastic Search App.
Hi @JasonStoltz, currently i do not want to show all the fields in the search output results. As such, I followed the above mentioned steps 1-3 but i think the {ResultView} is not getting called at all. Do you know the reason why?
I am using app-search-7.3.1 locally and using the reference ui that i exported out.
@jh.94 I'm not totally sure what is going on there. If you're simply trying to change the fields that get displayed, you can do that quite easily by updating the "engine.json" file. Here some more information on that: https://github.com/elastic/app-search-reference-ui-react#updating-configuration. You would use the resultFields option to control that.
Basically, what I am trying to do is to simply hide some of the fields that get displayed. For example, the field "case_id" is which is set as the titleField, is being displayed twice both in the resultField and titleField. The same applies as well for the field "update_link" which is set as the urlField as it is also shown in the resultFields.
Both "case_id" and "update_link" fields was not specified at all in the resultFields but i don't know why it is still showing up.
Ok, so the problem might be that you are on an older version of Reference UI that does not support that prop. There's two solutions to this...
Manually update all of the "search-ui" dependencies in your package.json to 1.1. The only problem with this is that there may be some breaking changes that break your code.
Thanks for your suggestion, I downloaded a fresh copy of the Reference UI from the link and replaced the engine.json file.
However, the results are still the same as the titleField and urlField still stays in the search results. The engine.json file is the same that was previously posted above. The only difference was that I added in the "endpointBase" parameter which I noticed was not specified in the sample engine.json.example file.
Do you think being a self-managed (local) installation is the problem?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.