Page MenuHomePhabricator

searching for floats without units doesn't work right
Closed, ResolvedPublic


Author: info

Searching for a value of an attribute of Type:Float without units doesn't return
pages with that value that do have units.

E.g. if attribute values are 42 (no value), 42 km, and 42 miles; then searching
for 42 only finds the first one.

SpecialSearchTriple's searchAttributes() always queries on unit, even if unit is
blank. Maybe it should treat a blank unit as NULL unit so it doesn't search on it.

This may only be true for SearchTriple, but I think AskSpecial has issues also.

(If an attribute is of a type that does support unit conversions, then I believe
leaving off the unit triggers the default unit conversion. I think that's
reasonable behavior.)

Version: unspecified
Severity: minor



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:30 PM
bzimport set Reference to bz8838.

Special:SearchTriple is about to be rewritten, so we have to wait which new
specials appear and which problems they have. In general, they are likely to
behave much like <ask> and its special, since all unit handling is now taken
care of by SMWDataValue which is passed on for searching a value -- the caller
no longer decides which untis are passed, but merely generates an SMWDataValue
which does this.

I think this closes this bug.