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

Rewrite CompartmentSearch to main search index in Cosmos #2430

Merged
merged 1 commit into from Jan 19, 2022

Conversation

brendankowitz
Copy link
Member

@brendankowitz brendankowitz commented Jan 12, 2022

Description

Rewrite CompartmentSearch to main search index in Cosmos.

Example of expanded rewritten expressions:
image

Rewriter uses type filtering information to only include the relevant search params.

Related issues

Addresses AB#87577.

Testing

  • Existing Unit and E2E tests
  • Manual test cases

FHIR Team Checklist

  • Update the title of the PR to be succinct and less than 50 characters
  • Add a milestone to the PR for the sprint that it is merged (i.e. add S47)
  • Tag the PR with the type of update: Bug, Dependencies, Enhancement, or New-Feature
  • Tag the PR with Azure API for FHIR if this will release to the Azure API for FHIR managed service (CosmosDB or common code related to service)
  • Tag the PR with Azure Healthcare APIs if this will release to the Azure Healthcare APIs managed service (Sql server or common code related to service)
  • CI is green before merge
  • Review squash-merge requirements

Semver Change (docs)

Patch (bug)

@brendankowitz brendankowitz requested a review from a team as a code owner January 12, 2022 22:17
@brendankowitz brendankowitz force-pushed the personal/bkowitz/compartment-search-fix branch from ecc347f to 9989724 Compare January 13, 2022 22:26
_expressionRewriters = new Lazy<IReadOnlyCollection<IExpressionVisitorWithInitialContext<object, Expression>>>(() => expressionRewriters
.OrderBy(x => x.Order)
.Cast<IExpressionVisitorWithInitialContext<object, Expression>>()
.Append(DateTimeEqualityRewriter.Instance)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have tests which combine compartment search with DateTime comparison? Is that even possible?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There shouldn't be any restriction on multiple rewriters being used. I thought I there was a case in the Patient Everything tests, but I wasn't able to get both rewriters to fire

@rotodd
Copy link
Contributor

rotodd commented Jan 14, 2022

I noticed we are still storing the compartment indices in the Cosmos DB resources - is this intentional?

@brendankowitz
Copy link
Member Author

I noticed we are still storing the compartment indices in the Cosmos DB resources - is this intentional?

Good question, happy to null them out first if it feels like the right thing to do. Since this doesn't apply to SQL yet, it might make sense to remove all this code with that as a second part. Also, if we were forced to roll-back for any reason, I'd rather still have them there :)

@brendankowitz brendankowitz added this to the S80 milestone Jan 18, 2022
@brendankowitz brendankowitz added Azure API for FHIR Label denotes that the issue or PR is relevant to the Azure API for FHIR Bug Bug bug bug. Area-CosmosDB Area related to CosmosDB storage labels Jan 18, 2022
@brendankowitz brendankowitz merged commit 3b33cea into main Jan 19, 2022
@brendankowitz brendankowitz deleted the personal/bkowitz/compartment-search-fix branch January 19, 2022 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-CosmosDB Area related to CosmosDB storage Azure API for FHIR Label denotes that the issue or PR is relevant to the Azure API for FHIR Bug Bug bug bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants