Last modified: 2010-03-03 16:25:25 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T17302, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 15302 - Add functionality to store and query number ranges
Add functionality to store and query number ranges
Status: REOPENED
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Markus Krötzsch
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-08-25 12:53 UTC by DaSch
Modified: 2010-03-03 16:25 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description DaSch 2008-08-25 12:53:21 UTC
When having a range of numbers for one property for example the postalcodes of a german city it would be much work to put them all in, instead the input [[Postalcode::44701–44894]] could generate a list of all numbers in this range and put them into this property

Another solution could be a special typ, range. When searching in this range for a number every page is displayed that has this number in it's range. Maybe the second solution is more work but I think it would give a better result.
Comment 1 Markus Krötzsch 2008-12-05 19:18:44 UTC
Making values of the shape "44701–44894" to create additional property-value assignments is not practical with the current architecture. I think it would be better to have a solution on a higher level, similar to the parser function for annotating lists of pages provided by Semantic Forms. So I propose to keep this out of SMW core, too.

There is a related issue with this first approach: it is not clear what "44701–44894" really means. SMW has a Type:Number that supports also decimal numbers, not just integers. So simply annotating with a list of values would somehow not cover the true interval semantics that was intended. This is OK for an added convenience function, but not really something to do in SMW core.


The alternative, supporting ranges as a value in their own right, is not compatible with SMW's property model, which assumes every property to have one value. A range could of course be considered as one value, and you could have a datatype that supports ranges as objects, but then you could not compare ranges to numbers. Instead, they would be a new kind of data, and you could only compare ranges to ranges (which is not so useful). Making ranges work as you suggest would require substantial internal changes in the way data is processed.


For those reasons, I close this as wontfix. Making a tiny extension that helps with such range inputs should be easy to do, if you really need it.



Comment 2 DaSch 2010-02-21 17:18:17 UTC
Well, when trying to add historical events I have a similar problem. When entering more then one date, I have the number of entries in ask-outputs is increasing nearly exponantial. See also https://bugzilla.wikimedia.org/show_bug.cgi?id=22547

Maybe there could be a additional type range for non-decimal numbers and ony type for date-ranges and one for temprature ranges

I could imagine many possible application areas
Comment 3 DaSch 2010-02-21 17:19:12 UTC
I reopen this, because I think that it's worth it to discuss possible solutions for this problem
Comment 4 Markus Krötzsch 2010-03-03 16:25:25 UTC
I leave this request open for now. If any possible solutions are proposed here, I will consider them for inclusion into SMW.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links