However, when they start at the Reporting Group for “UNFI Wednesday Weekly Flights (bi-weekly Gerrard’s)” and look at Performance Reports via Related Data, they will see 12 results.
This is misleading as users are missing/forgetting data because it isn’t returned in the results.
Expected behavior
Users should be able to see all 12 Reports that are related to “UNFI Wednesday Weekly Flights (bi-weekly Gerrard’s)” when supplying “Gerrard” to the search bar.
Context
Project name: refinition-data
Team name: operations
Environment name: prod
Database type: mysql
Recent changes made on your end if any: none - similar issues have been observed in other collections since we started using Forest Admin
Thank you for the tip on using the extended search. I was able to see the expected 12 Reports mentioned in my initial message after clicking that link on the collections page.
There is a difference between what we are seeing and what the documentation you provided shows. In the documentation, there is no data after running the standard search. This prompts users to try an extended search as there are no results.
In our case, the user is being provided with partial results. This would prompt them to believe their search is complete, and they would not think to click on extended search every time. If extended search is required to search on referenced fields as is stated in the documentation, why are we receiving partial results?
I’m looking for some explanation to give to our users so they know when they do and don’t need to click that extra button. I’m hoping the solution isn’t that they need to do it after each search, as I’m sure that step will be forgotten from time to time.
Exactly, by default when a search doesn’t return any results it prompts to try an extended search.
In your case, you had 9 records matching the Gerrard search because some field (not the reporting group though) matched the word Gerrard but they are not highlighted in you screen so probably fields more to the right of rows.
I totally agree with you. I have made a feedback to our product team to leverage this issue at some point (I don’t have any ETA to give you but the priority of this topic has raised thanks to you).
Here the list of feedback I gave
Not easy to see the Try an extended search button when having partial results
The difference between search and extended search is not clear to the user
Once you enter the extended search mode you cannot exist it anymore (or you need to manually change your query params…)
One on the simplest idea would be to provide some configuration to allow an extended search by default.
I just saw you were using the agent node.js (via a cloud installation).
Another solution is to override the search behavior to always extends the search in the agent itself.
agent.customizeCollection('performanceReports', collection => {
collection.replaceSearch((searchString, extendedMode, context) => {
// This function in the context gives access to the default search behavior
// including the advanced search
return context.generateSearchFilter(searchString, {
// Include fields from the first level of relations when true
extended: true,
});
});
});
Thank you for your suggestion to add the extended search by default to that collection using the generateSearchFilter. This is giving us the exact results we need.
I would like to confirm that we were not experiencing partial results due to related data. Per your earlier message, I’ve confirmed that the data was being matched was at the base collection in another field that gets populated via a scheduled process. This was the reason for it appearing as “partial results” to the end users.
We are now able to explain the “partial” results, as well as use the use extended search by default.
@morganperre, not an issue but just an observation:
After enabling the extended search by default in the config, the link for “Try an extended search” remains until you click it. Afterwards, the link disappears. That may give off the impression the extended search by default isn’t enabled when it is.
Again, thank you for your help. This config change solved our issue!
Exactly, I have made the feedback clear to the product team. Today, the experience is not well cooked so the front doesn’t know that the server do perform the extended search when using the replaceSearch → extended: true.
In this case the Try an extended search link shouldn’t be visible…
Anyway, we will comeback to you when improvement will be done on this topic. Again, thanks for you feedback. And have a great experience with Forest Admin.