Help:Property constraints portal/Single best value
This is the documentation page for a particular constraint type. See Help:Property constraints portal for a general overview of property constraints. |
single-best-value constraint (Q52060874) specifies that a property should have a single “best” value. It may have any number of values, but exactly one of them (the “best” one, by whatever criteria) should have preferred rank.
For example, there may be several measurements for the mass (P2067) of an element or elementary particle, but one of them is particularly precise and has also been replicated in different laboratories, and that one should generally be used.
The “best” value is used, for example, in the Wikidata query service: if you use wdt:
triples, for example in a query like this:
# current mayor of Berlin
SELECT ?mayor ?mayorLabel WHERE {
wd:Q64 wdt:P6 ?mayor.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
– then only the “best” value will be selected.
If no constraint scope (P4680) is specified, this constraint is checked everywhere.
Possible actions
editThere are several possible ways to address a violation of this constraint:
- The most likely case is that there are several statements for the property with normal rank and none with preferred rank. You may edit the “best” statement (by your best judgment) and set it to preferred rank.
- It is also possible that more than one statement has preferred rank, perhaps because a new best statement with preferred rank was added without removing the preferred rank from the previous best statement. In this case, it would make sense to edit the previous best statement (which has been superseded by the new one) and set it to normal rank.
- It’s possible that the item is a rare, but legitimate exception to the constraint, and nothing should be done.
Parameters
editThis constraint has one optional parameter:
- separator (P4155)
- If this parameter is present, multiple best values are allowed as long as they have different qualifiers for the property (or properties) given in this parameter.