Page MenuHomePhabricator

(MS 4) negate query
Closed, ResolvedPublic5 Estimated Story Points

Description

As an editor I want to find Items that do not have a specific statement in order to exclude Items from my result set.

Problem:
We are currently only able to look for Items that have a specific Property/value pair, not the ones that don't have it. We need to allow people to query for that as well.

Example:
All Items that do not have "instance of:human"

mockups

image.png (723×958 px, 67 KB)

BDD
GIVEN
AND
WHEN
AND
THEN
AND

Acceptance criteria:

  • result set does not contain Items that have the excluded statement

Notes:

SPARQL:

for when there are no other statements:

Matching value:

?item wikibase:sitelinks [].  MINUS { ?item wdt:P31 wd:Q5 . }

Without value:

?item wikibase:sitelinks []. MINUS { ?item wdt:P31 ?instance .  FILTER ( ?instance != wd:Q5 ) }

Regardless of value:

?item wikibase:sitelinks []. MINUS { ?item wdt:P31 ?instance . }

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Lydia_Pintscher renamed this task from negate first simple query to (MS 4) negate query.Oct 20 2020, 10:05 AM
Lydia_Pintscher set the point value for this task to 5.