Updates the logic used when compiling a filter string from the selected facets, such that each sub-category of a facet is treated with AND logic instead of combining into ORs for the whole parent category.
How do you test/verify these changes?
Create a project with a set of documents and facets such that several facets will only apply to specific subsets
Test that within a subcategory, fields are filtered as ORs (| when viewing the network query call)
Test that between subcategories, fields are filtered as ANDs (, when viewing the network query call)
Test that fields between an uncategorized facet and a categorized facet still filter as ANDs
Example
A --- parent category
B --- sub-category
C --- term
D --- term
E --- sub-category
F --- term
G --- parent category
H --- term
When C and D are selected, the documents returned are the union of C and D documents.
When C and F are selected, the documents returned are the intersection of C and F.
When C, D, F, and H are selected, the documents returned follow: (C OR D) AND F AND H
and so on...
#### Have you documented your changes (if necessary)?
N/A
#### Are there any breaking changes included in this pull request?
<!-- If there are, please ensure that you have included 'BREAKING CHANGE:' at the beginning of the optional body or footer section of the commit that introduces the breaking change. -->
What do these changes do/fix?
Implementation updates for https://github.ibm.com/Watson-Discovery/disco-issue-tracker/issues/15426
Updates the logic used when compiling a filter string from the selected facets, such that each sub-category of a facet is treated with AND logic instead of combining into ORs for the whole parent category.
How do you test/verify these changes?
|
when viewing the network query call),
when viewing the network query call)When C and D are selected, the documents returned are the union of C and D documents. When C and F are selected, the documents returned are the intersection of C and F. When C, D, F, and H are selected, the documents returned follow: (C OR D) AND F AND H and so on...