herd
herd copied to clipboard
Return facet info with Global Search results
As a Big Data Developer I want to see how global search results are classified so I can better understand the result set
Acceptance Criteria
- In Global Search endpoint, new optional parameter that allows user to specify they want Facet data with response
- In Global Search endpoint, require FacetFields parameter if Facet is specified. Only supported FacetFields at this time Tag and ResultType.
- If Tag is provided, facet value and count is returned for each TagType and Tag.
- If ResultType is provided, facet value and count is returned for each distinct result type (currently Category and Data Entity)
- Changes to response should be additive and backward compatible
- The values and counts should be based on the actual associations, not considering any additional parts of the hierarchy in the case of Tags
- Sort facetFields by TagType order, then ResultType
- Within each FacetField, sort facet values (Tags or ResultTypes) alpha
Example The list of result sets includes the following based on the fact they all match the string provided in the search
- Category A of TagType Z
- Category B of TagType Z
- Data Entity 1 (tagged with A, B)
- Data Entity 2 (tagged with A)
- Data Entity 3 (tagged with B)
Then the counts in the faced should read as:
- Z (5) = A (3), B (3)
- Result Type = Category (2), Data Entity (3)