Search service should not require pre-fetching #3524
Replies: 3 comments
-
We've opened a PR for the proposed (initial/short-term) solution here for review: #3525 |
Beta Was this translation helpful? Give feedback.
-
I've actually considered implementing something similar to what you're doing for our own Logic Apps use-cases. Once this work is in we could also probably take a look at marking a lot of the current search methods as optional and just run them if they're present, then we'd be able to use one or the other or both in a hybrid sense |
Beta Was this translation helpful? Give feedback.
-
Closing discussion |
Beta Was this translation helpful? Give feedback.
-
Problem statement
Current implementation of the search service expects that all operations are prefetched, and then on the client side, these can be either listed out by connector, or searched using Fuse. However, for Power Automate's consumption, we want to be able to control the results entirely from the server side, and do not want to do pre-fetching, as previously discussed with LAUX team.
We had an update made by @almaasrawi recently (PR linked below) that allowed actual search queries to go through the search service to the host, where we could control the results based on a server-side API call. However, this still required all operations to be pre-fetched; otherwise, when clicking a search result, the operation could not be found, and could not be added to the designer.
Work so far
Recently, we've had work completed in the following PRs:
Proposed solution
We are still working on a design for the proposed solution. Currently the thinking is:
getOperationById
that asynchronously can fetch a single operation.getOperationsByConnector
that asynchronously can fetch all operations based on which connector.recommendationPanelContext.tsx:onOperationClick
):getOperationById
is not defined in the search service, operate as normal. (Same case as today.)getOperationById
is defined, call the abovegetOperationById
method to see if we can get the operation that way.getOperationsByConnector
function.@almaasrawi is working on testing this change locally and will bring the change as a pull request, we expect either today or tomorrow. That said, whether this change is something that LAUX will support is something to address as part of this discussion item. Edit: The change can be found in a fork here.
Future work
In addition to the above, we want to open this for discussion as to whether this is a good long-term fix, or whether there is a more elegant solution. In an ideal world, we could completely re-design the search service interface to more concretely decouple search/recommendation from pre-fetching, but this is obviously a significant undertaking as well as a breaking change.
Beta Was this translation helpful? Give feedback.
All reactions