Hello,
I would like to ask can the Search UI be configured the searching results component to display the accuracy match of the result?
Probably something like above image from Relevance Tuning in App Search, but it shows accuracy percentage instead of the score.
The top result should have higher percentage for example 90% accuracy match with the searching.
Can I configure that in the React library maybe?
joemcelroy
(Joseph McElroy)
April 3, 2023, 7:25pm
2
Hey @aisyaharifin
In Search UI, you should be able to access the _meta
field for each hit which provides you the score. How do you want the percentage to be calculated?
Joe
Hey @joemcelroy ,
I'm not sure how the percentage is calculated but maybe the accuracy match with the search results?
How do I access the _meta field? Is it from my config?
export function stripUnnecessaryResultFields(resultFields) {
return Object.keys(resultFields).reduce((acc, n) => {
if (
[
"_meta",
"id",
toLowerCase(getTitleField()),
toLowerCase(getUrlField()),
toLowerCase(getThumbnailField()),
].includes(toLowerCase(n))
) {
return acc;
}
Thank you for your assistance.
joemcelroy
(Joseph McElroy)
April 5, 2023, 10:57am
4
Im assuming you are overriding the display of results via the resultView
prop.
Ive given an example here of this. See CustomView component sad-shadow-c5egik - CodeSandbox
system
(system)
Closed
May 3, 2023, 10:58am
5
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.