Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide configurable properties for max page size and max number of included resources on search results #1868

Closed
michaelwschroeder opened this issue Jan 13, 2021 · 2 comments
Assignees
Labels

Comments

@michaelwschroeder
Copy link
Contributor

Is your feature request related to a problem? Please describe.
The maximum page size for a search request is currently set to 1000, and is not configurable. Also, there is no limit on the number of included resources returned in a page for _include and _revinclude searches.

Describe the solution you'd like
Configuration properties should be provided for both the maximum page size for a search request, as well as the maximum number of included resources returned in a page for _include and _revinclude searches.

Describe alternatives you've considered
None

Acceptance Criteria
At least one acceptance criteria is included.

  1. GIVEN a configuration property for max page size is set
    WHEN a search is executed that has more results than the configured max page size
    THEN verify that the search results are paged and the page size is limited to the max page size configured
  2. GIVEN a configuration property for max number of included resources is set
    WHEN a _revinclude or _include search is executed that has more include results for a page than the configured max number of included resources
    THEN verify that the search fails

Additional context
Add any other context or screenshots about the feature request here.

@lmsurpre
Copy link
Member

If someone sets these too high, there could be memory issues and/or response time issues

@tbieste tbieste self-assigned this May 17, 2021
@tbieste tbieste added this to the Sprint 2021-07 milestone May 17, 2021
tbieste added a commit that referenced this issue May 17, 2021
Signed-off-by: Troy Biesterfeld <tbieste@us.ibm.com>
tbieste added a commit that referenced this issue May 17, 2021
Signed-off-by: Troy Biesterfeld <tbieste@us.ibm.com>
tbieste added a commit that referenced this issue May 18, 2021
Signed-off-by: Troy Biesterfeld <tbieste@us.ibm.com>
tbieste added a commit that referenced this issue May 18, 2021
Signed-off-by: Troy Biesterfeld <tbieste@us.ibm.com>
tbieste added a commit that referenced this issue May 18, 2021
Signed-off-by: Troy Biesterfeld <tbieste@us.ibm.com>
tbieste added a commit that referenced this issue May 18, 2021
Signed-off-by: Troy Biesterfeld <tbieste@us.ibm.com>
tbieste added a commit that referenced this issue May 18, 2021
Signed-off-by: Troy Biesterfeld <tbieste@us.ibm.com>
tbieste added a commit that referenced this issue May 19, 2021
Signed-off-by: Troy Biesterfeld <tbieste@us.ibm.com>
tbieste added a commit that referenced this issue May 19, 2021
Signed-off-by: Troy Biesterfeld <tbieste@us.ibm.com>
tbieste added a commit that referenced this issue May 19, 2021
Signed-off-by: Troy Biesterfeld <tbieste@us.ibm.com>
tbieste added a commit that referenced this issue May 19, 2021
Signed-off-by: Troy Biesterfeld <tbieste@us.ibm.com>
tbieste added a commit that referenced this issue May 19, 2021
Signed-off-by: Troy Biesterfeld <tbieste@us.ibm.com>
tbieste added a commit that referenced this issue May 19, 2021
Issue #1868 - Configurable max page size and max page included resources
@michaelwschroeder
Copy link
Contributor Author

I verified this issue by testing the following scenarios while running my local FHIR server with the latest code level:

  1. set maxPageSize to less than defaultPageSize and executed a search with no _count parameter - the search returned maxPageSize results and the self link contained a _count set equal to maxPageSize
  2. set maxPageSize to greater than defaultPageSize and executed a search with no _count parameter - the search returned defaultPageSize results and the self link contained a _count set equal to defaultPageSize
  3. set maxPageSize to greater than defaultPageSize and executed a search with _count parameter value set to greater than maxPageSize - the search returned maxPageSize results and the self link contained a _count set equal to maxPageSize
  4. set maxPageSize to greater than defaultPageSize and executed a search with _count parameter value set to less than maxPageSize - the search returned _count results and the self link contained a _count set equal to input _count
  5. set maxPageIncludeCount and executed a search that returned more than maxPageIncludeCount - the search returned an error as expected
  6. set maxPageIncludeCount and executed a search that returned less than maxPageIncludeCount - the search returned included results as expected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants