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

SearchNarrowInterceptor ignored during $lastn operation #4668

Open
Milzor opened this issue Mar 22, 2023 · 2 comments · May be fixed by #4669
Open

SearchNarrowInterceptor ignored during $lastn operation #4668

Milzor opened this issue Mar 22, 2023 · 2 comments · May be fixed by #4669

Comments

@Milzor
Copy link

Milzor commented Mar 22, 2023

NOTE: Before filing a ticket, please see the following URL:
https://github.com/hapifhir/hapi-fhir/wiki/Getting-Help

Describe the bug
SearchNarrowInterceptor ignored during $lastn operation.

To Reproduce
Steps to reproduce the behavior:

  1. Implement SearchNarrowInterceptor
  2. Add SearchNarrowInterceptor to interceptors
  3. Enable lastn operation
  4. Enable hibernate search elasticsearch

Expected behavior
Observation/$lastn operation should narrow result based on SearchNarrowInterceptor implementation

Screenshots

Environment (please complete the following information):

  • HAPI FHIR Version 6.4.4

Additional context
During the $lastn operation the OperationType is extended-operation-type which results in a true outcome of the below statement.

public class SearchNarrowingInterceptor {
    ...
    private boolean shouldSkipNarrowing(RequestDetails theRequestDetails) {
        return theRequestDetails.getRestOperationType() != RestOperationTypeEnum.SEARCH_TYPE
                   && !"$everything".equalsIgnoreCase(theRequestDetails.getOperation());
    }

Should the above code include the following statement:

&& !"$lastn".equalsIgnoreCase(theRequestDetails.getOperation());
@marc3112
Copy link

+1

@Milzor
Copy link
Author

Milzor commented Mar 22, 2023

See #4669

@Milzor Milzor linked a pull request Mar 27, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants