Update api reports and add changeset files

Signed-off-by: Camila Belo <camilaibs@gmail.com>
This commit is contained in:
Camila Belo
2022-10-03 10:09:32 +02:00
parent d7200e4d91
commit a799972bb1
7 changed files with 38 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-search-common': minor
---
There is a new property called `pageLimit` on the `SearchQuery` interface that specifies how many results should be returned per page.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-search-backend-module-elasticsearch': minor
---
The `Elastic Search` search engine query now contains a property called `pageLimit`, this new property specifies how many results to return per page and its default value is 25.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-search-react': minor
---
Added new page boundary to search query context and results state.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-search-backend-node': minor
---
The `Lunr` search engine query now contains a property called `pageLimit`, this new property specifies how many results to return per page and its default value is 25.
+14
View File
@@ -0,0 +1,14 @@
---
'@backstage/plugin-search-backend': minor
---
The query received by search engines now contains a property called `pageLimit`, it specifies how many results to return per page when sending a query request to the search backend.
Example:
_Returns up to 30 results per page_
```
GET /query?pageLimit=30
```
It is worth mentioning that only the Lunr and Elastic Search engines currently use this new property in their implementations. So that means you can't use it with Postgres for now. The search backend doesn't set a default value for the page limit parameter, it leaves it up to each search engine to set this, so Lunr and Elastic Search set 25 results per page as a default value.
+2
View File
@@ -102,6 +102,8 @@ export interface SearchQuery {
// (undocumented)
pageCursor?: string;
// (undocumented)
pageLimit?: number;
// (undocumented)
term: string;
// (undocumented)
types?: string[];
+2
View File
@@ -165,6 +165,7 @@ export type SearchContextState = {
term: string;
types: string[];
filters: JsonObject;
pageLimit?: number;
pageCursor?: string;
};
@@ -174,6 +175,7 @@ export type SearchContextValue = {
setTerm: React_2.Dispatch<React_2.SetStateAction<string>>;
setTypes: React_2.Dispatch<React_2.SetStateAction<string[]>>;
setFilters: React_2.Dispatch<React_2.SetStateAction<JsonObject>>;
setPageLimit: React_2.Dispatch<React_2.SetStateAction<number | undefined>>;
setPageCursor: React_2.Dispatch<React_2.SetStateAction<string | undefined>>;
fetchNextPage?: React_2.DispatchWithoutAction;
fetchPreviousPage?: React_2.DispatchWithoutAction;