Page MenuHomePhabricator

Allow searching for a particular statement without a particular qualifier
Closed, ResolvedPublic

Description

For example, a user should be able to search for all images that depict a cat, but that don't specify the colour of the cat

Solution is to use a prefix query https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-prefix-query.html instead of an exact match query for haswbstatement if there's a * at the end of a haswbstatement keyword

Then the user could find all images depicting a cat but that don't have a colour for that cat like this haswbstatement:P180=Q146 -haswbstatement:P180=Q146[P462=*

Details

Related Gerrit Patches:

Event Timeline

Cparle created this task.Oct 15 2018, 11:49 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 15 2018, 11:49 AM
Cparle moved this task from To Do to Doing on the Structured Data Engineering board.
Cparle updated the task description. (Show Details)Oct 16 2018, 2:31 PM

Change 467699 had a related patch set uploaded (by Cparle; owner: Cparle):
[mediawiki/extensions/Wikibase@master] Change haswbstatement to a prefix query

https://gerrit.wikimedia.org/r/467699

Cparle updated the task description. (Show Details)Oct 16 2018, 4:08 PM
Ramsey-WMF moved this task from Untriaged to Next up on the Multimedia board.Oct 17 2018, 5:03 PM

Change 467699 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Query syntax hint to allow haswbstatement be a prefix query

https://gerrit.wikimedia.org/r/467699

debt moved this task from needs triage to watching / waiting on the Discovery-Search board.
debt added a subscriber: debt.

Moving this to watching, let Discovery-Search know if more assistance is needed. :)

Cparle closed this task as Resolved.Feb 6 2019, 9:29 AM

Strictly speaking this ticket was for the backend part, which is merged, working and deployed - so I'm gonna close this