Page MenuHomePhabricator

Query Builder inconsistently returns items and other entity types
Open, Needs TriagePublic

Description

As a Query Builder user, I want to understand what kind of entities or results a query can return.

Problem:
Normally, queries generated by the query builder don’t place any restrictions on the entity type: for example, “subproperty of” with any value will return plenty of properties. However, when only negative query patterns are used (e.g. without “subproperty of”), then the generated query includes ?item wikibase:sitelinks _:anyValue. (introduced in T272012), so that only items can be returned (non-items have no wikibase:sitelinks triple). This is inconsistent.

Screenshots/mockups:

BDD
GIVEN
AND
WHEN
AND
THEN
AND

Acceptance criteria:

  • TBD

Open questions:

  • Should the query builder always be limited to only return items, not other entity types? Or should the “only negative patterns” case be changed to allow other entity types as well? (For example, wikibase:statements instead of wikibase:sitelinks would include properties and lexemes, though not forms and senses.)

Event Timeline

(Side note: so far, all the “only negative query patterns” queries I’ve tried timed out, so I’m not sure how useful this is in its current form, tbh.)