Page MenuHomePhabricator

{{#ask}} support for inclusive OR
Closed, ResolvedPublic

Description

Author: geoobject

Description:
The SMW <ask> tag reportedly includes an undocumented feature that supports 'inclusive or' between query properties. Both tag extension and parser function support 'inclusive or' to compare different values for same property, for example:

{{#ask: [[prop1::value1||value2]] }}

Request similar functionality between different properties. For example, ability to resolve following where '||' syntax represents OR:

{{#ask: [[prop1::{{PAGENAME}}]] || [[prop2::{{PAGENAME}}]] }}


Version: unspecified
Severity: enhancement

Details

Reference
bz12817

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:06 PM
bzimport set Reference to bz12817.
bzimport added a subscriber: Unknown Object (MLST).

Setting to severity to "enhancement", as this is really a feature request IMO.
It's certainly not a "blocker", since SMW works just fine without it, it's just missing some functionality.

This is now implemented, where the keyword "OR" is used for disjunctions at top-level ("||" would conflict with MediaWikis parsing for {{# ...}}). This only works properly with the new storage engine (for SVN version, this is not the default yet. Set $smwgDefaultStore = 'SMWSQLStore2'; in LocalSettings.php, and use SMW_setup.php and SMW_refreshData.php again to convert data from the old store).