Skip to content

Commit

Permalink
IBX-9314: UDW's suggestions query performance optimization (#1406)
Browse files Browse the repository at this point in the history
  • Loading branch information
barw4 authored Dec 13, 2024
1 parent 06d1b32 commit 843ac71
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ export const useFindLocationsByParentLocationIdFetch = (locationData, { sortClau
{
...restInfo,
parentLocationId: locationData.parentLocationId,
limit,
offset,
},
resolve,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -508,16 +508,15 @@ export const fetchAdminConfig = async ({ token, siteaccess, accessToken, instanc
return adminUiConfig.ApplicationConfig;
};

export const findSuggestions = (
{ siteaccess, token, parentLocationId, accessToken, instanceUrl = DEFAULT_INSTANCE_URL, limit = QUERY_LIMIT, offset = 0 },
callback,
) => {
export const findSuggestions = ({ siteaccess, token, parentLocationId, accessToken, instanceUrl = DEFAULT_INSTANCE_URL }, callback) => {
const body = {
ViewInput: {
identifier: 'view_with_aggregation',
LocationQuery: {
limit,
offset,
// '0' is a proper choice here because aggregation will still provide proper results.
// We care only about the aggregation itself, not about fetching records.
limit: 0,
offset: 0,
Filter: {
ParentLocationIdCriterion: parentLocationId,
},
Expand Down

0 comments on commit 843ac71

Please sign in to comment.