OpenSearch and GraphQL multivalue facets #551
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why are these changes being introduced:
which allows us to filter records to find just those that have
contentTypes
of bothdataset
andstill image
for exampleOR
instead ofAND
literaryForm
is the only aggregation that accepts a single value inthe data model
Relevant ticket(s):
How does this address that need:
(once per value)
source
as custom logic separate from this refactorDocument any side effects to this change:
format
. Weaggregated under
contentFormat
but accepted queries underformat
.I have normalized both sides of that to use
format
.test was created.
contentType
was chosen as that was the value thetimdex-ui needs to support for RDI. Unit testing all of the fields and
integration testing just one felt okay as it avoids a lot of
additional semi-fragile tests (see below) while ensuring we are
constructing the expected query structure.
specific values in the data the new test is semi-fragile because we at
least need data that can be filtered twice to test for the expected
data change. As we stabilize the timdex pipelines, we should create a
specific test set of data rather than using what is available. This
would allow us to extract records from each source, while also pulling
some with specific attributes we want to test... including some
potentially constructed records to test values we want to support in
code but can't find appropriate examples. This test set should be
stored in a way that the new data loader can easily load it locally,
but we should also consider having a specific
test
alias loadedwith this data in dev1 or stage to allow us to access it from PR
builds when appropriate to demonstrate specific problems/solutions to
stakeholders without having to manipulate the "real" aliases/indexes.
OpenSearch#filter
was updated to accept aparams
argument rather than reading from an instance variable to allow for easier unit testingDeveloper
our guide and
all issues introduced by these changes have been resolved or opened as new
issues (link to those issues in the Pull Request details above)
Code Reviewer
(not just this pull request message)
Requires database migrations?
NO
Includes new or updated dependencies?
NO