Page MenuHomePhabricator

Improve constraint property item suggestions for property constraint values (value type)
Open, Stalled, MediumPublic

Description

As a user that works with constraint definitions I would like to get context based suggestions, so I see the semantically correct ( type of ) items for suggestions better.

GIVEN I am on an item.
WHEN I add a property 'head of government' (P6)
AND I focus the input field and enter a search string
THEN I would like to see constraint items higher that are instance of human, fictional character and dog.

GIVEN I am on a property page.
WHEN I add a property 'head of government' (P6)
AND I focus the input field and enter 'single'
THEN I would like to see the 'single value constraint' item in the suggestions.

Event Timeline

Jonas triaged this task as Medium priority.Aug 2 2018, 10:27 AM
Jonas created this task.

@Stas I have created this ticket that we could use to find language items or lexical categories T189744: Add hints parameter to wbsearchentities as described in your ticket without the need for an additional hint parameter. But it is currently blocked on missing support for search terms like this 'haswbstatement:P31=Q4 OR haswbstatement:P31=Q5'.
Do you have a ticket for the refactoring of the search term parsing?

it is currently blocked on missing support for search terms like this haswbstatement:P31=Q4 OR haswbstatement:P31=Q5.

I am not sure how soon (if at all - it may be possible but we didn't discuss it properly yet AFAIK) we'll be doing syntax support in completion search. This has some complications I think - the fulltext and completion search queries are a bit different, and I am not sure all keywords would even apply. In any case, the main epic is T185108: Refactor query parsing logic.

But if you'd like to have this functionality (and others like it) soon-ish, I'd go with T189744, at least as temporary solution, because this can be done much faster. If we can wait for a while until the query parsing stabilizes and is in the form that can support keywords in completion search (I am still not 100% sure how that would work UI-wise?) then it may be a viable road but we'd need to discuss it. As @dcausse who is doing the bulk of the work is on vacation next 2 weeks, that'd probably have to happen sometime late August (the discussion, implementation probably will take longer).

it is currently blocked on missing support for search terms like this haswbstatement:P31=Q4 OR haswbstatement:P31=Q5.

I am not sure how soon (if at all - it may be possible but we didn't discuss it properly yet AFAIK) we'll be doing syntax support in completion search. This has some complications I think - the fulltext and completion search queries are a bit different, and I am not sure all keywords would even apply. In any case, the main epic is T185108: Refactor query parsing logic.

But if you'd like to have this functionality (and others like it) soon-ish, I'd go with T189744, at least as temporary solution, because this can be done much faster. If we can wait for a while until the query parsing stabilizes and is in the form that can support keywords in completion search (I am still not 100% sure how that would work UI-wise?) then it may be a viable road but we'd need to discuss it. As @dcausse who is doing the bulk of the work is on vacation next 2 weeks, that'd probably have to happen sometime late August (the discussion, implementation probably will take longer).

A lot of use cases could be satisfied even without logical operator.
e.g. haswbstatement:P31=Unit, haswbstatement:P31=Grammatical feature
What do you think?

Jonas moved this task from Incoming to Ready to estimate on the Wikidata-Campsite board.

The problem is not the logical operator, the problem is that the completion search does not do query parsing now. It only sends the string as is, with little modification, out to the query. Adding query parsing to it is not a small addition, so I assume it would require some work to do.

Addshore subscribed.

Not currently a Wikidata-Campsite priority (untouched in 9 months)

Addshore changed the task status from Open to Stalled.Jan 14 2020, 12:33 PM