Imporve consistency of results from azure provider
The search feature does not produce consistent results across api pages. This seems to be more likely if the pages are sorted by rank. This changes the sort order, in order to make the pages a little bit more consistent as the search index in azure changes. Signed-off-by: Brian Fletcher <brian@roadie.io>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-backend-module-azure': patch
|
||||
---
|
||||
|
||||
Improve consistency of results from the `AzureDevOpsEntityProvider`.
|
||||
@@ -64,6 +64,12 @@ export async function codeSearch(
|
||||
method: 'POST',
|
||||
body: JSON.stringify({
|
||||
searchText: `path:${path} repo:${repo || '*'} proj:${project || '*'}`,
|
||||
$orderBy: [
|
||||
{
|
||||
field: 'path',
|
||||
sortOrder: 'ASC',
|
||||
},
|
||||
],
|
||||
$skip: items.length,
|
||||
$top: PAGE_SIZE,
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user