-
Notifications
You must be signed in to change notification settings - Fork 48
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
corrected hierarchy filter query on perspective #78
Conversation
@harshkothari410 looks like with the code coverage changes, the db tests does not run any more. Also, the db reset does not happen any more. Not sure if these were the intended; if not can you take a look any time you are free? |
q += 'aspect' + sign + p.aspectFilter.join(); | ||
const sign = p.aspectFilterType === 'INCLUDE' ? '' : '-'; | ||
q += 'aspect' + '=' + sign + | ||
p.aspectFilter.join().replace(/,/g, ',' + sign); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it really need the sign before each one?
wouldn't ...?aspect=-A,B,C
set up an EXCLUDE filter for all three aspects without having to put the minus sign before each one ...?aspect=-A,-B,-C
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The API docs for GET /v1/subjects/.../hierarchy are ambiguous about this:
Comma-separated list of aspect names to include/exclude. For example, ?aspect=FOO,BAR will only return subjects in the hierarchy with samples for those two aspects (and all those subjects' ancestors up to the specified root of the requested hierarchy). Prefix the aspect name with a negative sign to indicate that a sample with that aspect should be excluded. For example, ?aspect=-BAZ will return only the subjects (and its hierarchy) that have samples with aspect name not equal to BAZ. Subjects without samples are not included in the result set
The api docs don't explicitly say anything about excluding multiple items.
No description provided.