Page MenuHomePhabricator

wbstatementquantity search keyword seems broken
Closed, DeclinedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:

  • no results are found

What should have happened instead?:

Background:
wbstatementquantity is a search keyword to search for the quantity of things. It was introduced in T195955 and is documented at https://www.mediawiki.org/wiki/Help:Extension:WikibaseCirrusSearch#wbstatementquantity

Event Timeline

A thing that could be significant (from the documentation):

Note that not all statements are indexed. Searching for a statement about a property that has not been indexed will give an empty result.

Indexed data can be seen using this tool: https://www.wikidata.org/wiki/Q1997?action=cirrusdump

I think this feature was originally meant to be used on commons and it appears that it was never properly configured anywhere (unless I'm missing something).
For a quantity to be searchable via this keyword a statement must have a qualifier of type UnboundedQuantityValue and be explicitly added to $wgWBRepoSettings['searchIndexQualifierPropertiesForQuantity'].
So for wikidata and this particular example we would have to configure this value with :

$wgWBRepoSettings['searchIndexQualifierPropertiesForQuantity'] = ['P1114'];

I think this feature was originally meant to be used on commons and it appears that it was never properly configured anywhere (unless I'm missing something).
For a quantity to be searchable via this keyword a statement must have a qualifier of type UnboundedQuantityValue and be explicitly added to $wgWBRepoSettings['searchIndexQualifierPropertiesForQuantity'].
So for wikidata and this particular example we would have to configure this value with :

$wgWBRepoSettings['searchIndexQualifierPropertiesForQuantity'] = ['P1114'];

Oh, you're right! It seems to be just plain not configured at all anywhere: https://codesearch.wmcloud.org/search/?q=searchIndexQualifierPropertiesForQuantity

Mh, the tickets associated with T191633: Implement searching of 'depicts' on commons are interesting, I can't seem to find one that every sets searchIndexQualifierPropertiesForQuantity configuration. T194245#4477328 almost reads like it was intended to create another task to add the missing config and then reindex, but maybe that somehow never happened?

Mh, the tickets associated with T191633: Implement searching of 'depicts' on commons are interesting, I can't seem to find one that every sets searchIndexQualifierPropertiesForQuantity configuration. T194245#4477328 almost reads like it was intended to create another task to add the missing config and then reindex, but maybe that somehow never happened?

Yes this is my understanding as well, the commons and wikidata wikis were reindexed by then but the config was never updated anywhere, seems like this feature fell into a crack. If you believe this might be valuable for wikidata we could try to estimate what it would cost to index this (note that once enabled since this data comes from MW we might have to wait for several months for the data to populate elastic).

Let me check in with Product first. No point in investing work into a feature that maybe isn't needed. I only noticed this when looking at Wikidata search capabilities for unrelated reasons.

I have not seen anyone complain about this so far so the easiest thing for now is probably to adjust the documentation and be done with it until it becomes a thing.

Gehel subscribed.

Documentation updated, let's close!