r24047 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r24046‎ | r24047 | r24048 >
Date:21:04, 12 July 2007
Author:mkroetzsch
Status:old
Tags:
Comment:
Configurable support for propery hierarchies in query answering.
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_Settings.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore.php
@@ -7,8 +7,7 @@
88
99 global $smwgIP;
1010 require_once( "$smwgIP/includes/storage/SMW_Store.php" );
11 -require_once( "$smwgIP/includes/SMW_Datatype.php" );
12 -require_once( "$smwgIP/includes/SMW_DataValue.php" );
 11+require_once( "$smwgIP/includes/SMW_DataValueFactory.php" );
1312
1413 /**
1514 * Storage access class for using the standard MediaWiki SQL database
@@ -34,10 +33,19 @@
3534 */
3635 static protected $m_tablenum = 0;
3736 /**
38 - * Array of names of virtual tables that hold the upper closure of certain
 37+ * Array of names of virtual tables that hold the lower closure of certain
3938 * categories wrt. hierarchy.
4039 */
4140 static protected $m_categorytables = array();
 41+ /**
 42+ * Array of names of virtual tables that hold the lower closure of certain
 43+ * categories wrt. hierarchy.
 44+ */
 45+ static protected $m_propertytables = array();
 46+ /**
 47+ * Record all virtual tables used for a single operation (especially query) to produce debug output.
 48+ */
 49+ protected $m_usedtables;
4250
4351
4452 ///// Reading methods /////
@@ -618,6 +626,7 @@
619627 $prs = $query->getDescription()->getPrintrequests(); // ignore print requests at deeper levels
620628
621629 // Build main query
 630+ $this->m_usedtables = array();
622631 $this->m_sortkey = $query->sortkey;
623632 $this->m_sortfield = false;
624633
@@ -668,12 +677,12 @@
669678 foreach ($query->getErrors() as $error) {
670679 $result .= $error . '<br />';
671680 }
672 - $result .= '<br /><b>Auxilliary tables used (possibly in multiple copies)</b><br />';
673 - foreach (SMWSQLStore::$m_categorytables as $tablename) {
 681+ $result .= '<br /><b>Auxilliary tables used</b><br />';
 682+ foreach ($this->m_usedtables as $tablename) {
674683 $result .= $tablename . ': ';
675 - $res = $db->query( "SELECT cat_name FROM $tablename", 'SMW::getQueryResult:DEBUG');
 684+ $res = $db->query( "SELECT title FROM $tablename", 'SMW::getQueryResult:DEBUG');
676685 while ( $row = $db->fetchObject($res) ) {
677 - $result .= $row->cat_name . ', ';
 686+ $result .= $row->title . ', ';
678687 }
679688 $result .= '<br />';
680689 }
@@ -880,50 +889,51 @@
881890 }
882891
883892 /**
884 - * Make a (temporary) table that contains the upper closure of the given category
 893+ * Make a (temporary) table that contains the lower closure of the given category
885894 * wrt. the category table.
886895 */
887896 protected function getCategoryTable($catname, &$db) {
888 - global $wgDBname, $smwgIQSubcategoryInclusions;
 897+ global $wgDBname, $smwgQSubcategoryDepth;
889898
890899 $tablename = 'cats' . SMWSQLStore::$m_tablenum++;
 900+ $this->m_usedtables[] = $tablename;
891901 $db->query( 'CREATE TEMPORARY TABLE ' . $tablename .
892 - '( cat_name VARCHAR(255) NOT NULL )
 902+ '( title VARCHAR(255) NOT NULL )
893903 TYPE=MEMORY', 'SMW::getCategoryTable' );
894904 if (array_key_exists($catname, SMWSQLStore::$m_categorytables)) { // just copy known result
895 - $db->query("INSERT INTO $tablename (cat_name) SELECT " .
 905+ $db->query("INSERT INTO $tablename (title) SELECT " .
896906 SMWSQLStore::$m_categorytables[$catname] .
897 - '.cat_name FROM ' . SMWSQLStore::$m_categorytables[$catname],
 907+ '.title FROM ' . SMWSQLStore::$m_categorytables[$catname],
898908 'SMW::getCategoryTable');
899909 return $tablename;
900910 }
901911
902912 // Create multiple temporary tables for recursive computation
903913 $db->query( 'CREATE TEMPORARY TABLE smw_newcats
904 - ( cat_name VARCHAR(255) NOT NULL )
 914+ ( title VARCHAR(255) NOT NULL )
905915 TYPE=MEMORY', 'SMW::getCategoryTable' );
906916 $db->query( 'CREATE TEMPORARY TABLE smw_rescats
907 - ( cat_name VARCHAR(255) NOT NULL )
 917+ ( title VARCHAR(255) NOT NULL )
908918 TYPE=MEMORY', 'SMW::getCategoryTable' );
909919 $tmpnew = 'smw_newcats';
910920 $tmpres = 'smw_rescats';
911921
912922 $pagetable = $db->tableName('page');
913923 $cltable = $db->tableName('categorylinks');
914 - $db->query("INSERT INTO $tablename (cat_name) VALUES ('$catname')", 'SMW::getCategoryTable');
915 - $db->query("INSERT INTO smw_newcats (cat_name) VALUES ('$catname')", 'SMW::getCategoryTable');
 924+ $db->query("INSERT INTO $tablename (title) VALUES ('$catname')", 'SMW::getCategoryTable');
 925+ $db->query("INSERT INTO $tmpnew (title) VALUES ('$catname')", 'SMW::getCategoryTable');
916926
917927 /// TODO: avoid duplicate results?
918 - for ($i=0; $i<$smwgIQSubcategoryInclusions; $i++) {
919 - $db->query("INSERT INTO $tmpres (cat_name) SELECT $pagetable.page_title
 928+ for ($i=0; $i<$smwgQSubcategoryDepth; $i++) {
 929+ $db->query("INSERT INTO $tmpres (title) SELECT $pagetable.page_title
920930 FROM $cltable,$pagetable,$tmpnew WHERE
921 - $cltable.cl_to=$tmpnew.cat_name AND
 931+ $cltable.cl_to=$tmpnew.title AND
922932 $pagetable.page_namespace=" . NS_CATEGORY . " AND
923933 $pagetable.page_id=$cltable.cl_from", 'SMW::getCategoryTable');
924934 if ($db->affectedRows() == 0) { // no change, exit loop
925935 continue;
926936 }
927 - $db->query("INSERT INTO $tablename (cat_name) SELECT $tmpres.cat_name
 937+ $db->query("INSERT INTO $tablename (title) SELECT $tmpres.title
928938 FROM $tmpres", 'SMW::getCategoryTable');
929939 $db->query('TRUNCATE TABLE ' . $tmpnew, 'SMW::getCategoryTable'); // empty "new" table
930940 $tmpname = $tmpnew;
@@ -938,13 +948,68 @@
939949 }
940950
941951 /**
 952+ * Make a (temporary) table that contains the lower closure of the given property
 953+ * wrt. the subproperty relation.
 954+ */
 955+ protected function getPropertyTable($propname, &$db) {
 956+ global $wgDBname, $smwgQSubpropertyDepth;
 957+
 958+ $tablename = 'prop' . SMWSQLStore::$m_tablenum++;
 959+ $db->query( 'CREATE TEMPORARY TABLE ' . $tablename .
 960+ '( title VARCHAR(255) NOT NULL )
 961+ TYPE=MEMORY', 'SMW::getPropertyTable' );
 962+ if (array_key_exists($propname, SMWSQLStore::$m_propertytables)) { // just copy known result
 963+ $db->query("INSERT INTO $tablename (title) SELECT " .
 964+ SMWSQLStore::$m_propertytables[$propname] .
 965+ '.title FROM ' . SMWSQLStore::$m_propertytables[$propname],
 966+ 'SMW::getPropertyTable');
 967+ return $tablename;
 968+ }
 969+
 970+ // Create multiple temporary tables for recursive computation
 971+ $db->query( 'CREATE TEMPORARY TABLE smw_new
 972+ ( title VARCHAR(255) NOT NULL )
 973+ TYPE=MEMORY', 'SMW::getPropertyTable' );
 974+ $db->query( 'CREATE TEMPORARY TABLE smw_res
 975+ ( title VARCHAR(255) NOT NULL )
 976+ TYPE=MEMORY', 'SMW::getPropertyTable' );
 977+ $tmpnew = 'smw_new';
 978+ $tmpres = 'smw_res';
 979+
 980+ $sptable = $db->tableName('smw_subprops');
 981+ $db->query("INSERT INTO $tablename (title) VALUES ('$propname')", 'SMW::getPropertyTable');
 982+ $db->query("INSERT INTO $tmpnew (title) VALUES ('$propname')", 'SMW::getPropertyTable');
 983+
 984+ /// TODO: avoid duplicate results?
 985+ for ($i=0; $i<$smwgQSubpropertyDepth; $i++) {
 986+ $db->query("INSERT INTO $tmpres (title) SELECT $sptable.subject_title
 987+ FROM $sptable,$tmpnew WHERE
 988+ $sptable.object_title=$tmpnew.title", 'SMW::getPropertyTable');
 989+ if ($db->affectedRows() == 0) { // no change, exit loop
 990+ continue;
 991+ }
 992+ $db->query("INSERT INTO $tablename (title) SELECT $tmpres.title
 993+ FROM $tmpres", 'SMW::getCategoryTable');
 994+ $db->query('TRUNCATE TABLE ' . $tmpnew, 'SMW::getPropertyTable'); // empty "new" table
 995+ $tmpname = $tmpnew;
 996+ $tmpnew = $tmpres;
 997+ $tmpres = $tmpname;
 998+ }
 999+
 1000+ SMWSQLStore::$m_propertytables[$propname] = $tablename;
 1001+ $db->query('DROP TABLE smw_new', 'SMW::getPropertyTable');
 1002+ $db->query('DROP TABLE smw_res', 'SMW::getPropertyTable');
 1003+ return $tablename;
 1004+ }
 1005+
 1006+ /**
9421007 * Add the table $tablename to the $from condition via an inner join,
9431008 * using the tables that are already available in $curtables (and extending
9441009 * $curtables with the new table). Return true if successful or false if it
9451010 * wasn't possible to make a suitable inner join.
9461011 */
947 - protected function addInnerJoin($tablename, &$from, &$db, &$curtables) {
948 - global $smwgIQRedirectNormalization;
 1012+ protected function addJoin($tablename, &$from, &$db, &$curtables) {
 1013+ global $smwgQEqualitySupport;
9491014 if (array_key_exists($tablename, $curtables)) { // table already present
9501015 return true;
9511016 }
@@ -957,13 +1022,13 @@
9581023 return true;
9591024 }
9601025 } elseif ($tablename == 'CATS') {
961 - if ($this->addInnerJoin('PAGE', $from, $db, $curtables)) { // try to add PAGE
 1026+ if ($this->addJoin('PAGE', $from, $db, $curtables)) { // try to add PAGE
9621027 $curtables['CATS'] = 'cl' . SMWSQLStore::$m_tablenum++;
9631028 $cond = $curtables['CATS'] . '.cl_from=' . $curtables['PAGE'] . '.page_id';
9641029 /// TODO: slow, introduce another parameter to activate this
965 - if ($smwgIQRedirectNormalization && (array_key_exists('PREVREL', $curtables))) {
 1030+ if ($smwgQEqualitySupport && (array_key_exists('PREVREL', $curtables))) {
9661031 // only do this at inner queries (PREVREL set)
967 - $this->addInnerJoin('REDIPAGE', $from, $db, $curtables);
 1032+ $this->addJoin('REDIPAGE', $from, $db, $curtables);
9681033 $cond = '((' . $cond . ') OR (' .
9691034 $curtables['REDIPAGE'] . '.page_id=' . $curtables['CATS'] . '.cl_from))';
9701035 }
@@ -971,13 +1036,13 @@
9721037 return true;
9731038 }
9741039 } elseif ($tablename == 'RELS') {
975 - if ($this->addInnerJoin('PAGE', $from, $db, $curtables)) { // try to add PAGE
 1040+ if ($this->addJoin('PAGE', $from, $db, $curtables)) { // try to add PAGE
9761041 $curtables['RELS'] = 'rel' . SMWSQLStore::$m_tablenum++;
9771042 $cond = $curtables['RELS'] . '.subject_id=' . $curtables['PAGE'] . '.page_id';
9781043 /// TODO: slow, introduce another parameter to activate this
979 - if ($smwgIQRedirectNormalization && (array_key_exists('PREVREL', $curtables))) {
 1044+ if ($smwgQEqualitySupport && (array_key_exists('PREVREL', $curtables))) {
9801045 // only do this at inner queries (PREVREL set)
981 - $this->addInnerJoin('REDIRECT', $from, $db, $curtables);
 1046+ $this->addJoin('REDIRECT', $from, $db, $curtables);
9821047 $cond = '((' . $cond . ') OR (' .
9831048 //$curtables['PAGE'] . '.page_id=' . $curtables['REDIRECT'] . '.rd_from AND ' .
9841049 $curtables['REDIRECT'] . '.rd_title=' . $curtables['RELS'] . '.subject_title AND ' .
@@ -987,13 +1052,13 @@
9881053 return true;
9891054 }
9901055 } elseif ($tablename == 'ATTS') {
991 - if ($this->addInnerJoin('PAGE', $from, $db, $curtables)) { // try to add PAGE
 1056+ if ($this->addJoin('PAGE', $from, $db, $curtables)) { // try to add PAGE
9921057 $curtables['ATTS'] = 'att' . SMWSQLStore::$m_tablenum++;
9931058 $cond = $curtables['ATTS'] . '.subject_id=' . $curtables['PAGE'] . '.page_id';
9941059 /// TODO: slow, introduce another parameter to activate this
995 - if ($smwgIQRedirectNormalization && (array_key_exists('PREVREL', $curtables))) {
 1060+ if ($smwgQEqualitySupport && (array_key_exists('PREVREL', $curtables))) {
9961061 // only do this at inner queries (PREVREL set)
997 - $this->addInnerJoin('REDIRECT', $from, $db, $curtables);
 1062+ $this->addJoin('REDIRECT', $from, $db, $curtables);
9981063 $cond = '((' . $cond . ') OR (' .
9991064 //$curtables['PAGE'] . '.page_id=' . $curtables['REDIRECT'] . '.rd_from AND ' .
10001065 $curtables['REDIRECT'] . '.rd_title=' . $curtables['ATTS'] . '.subject_title AND ' .
@@ -1003,19 +1068,19 @@
10041069 return true;
10051070 }
10061071 } elseif ($tablename == 'TEXT') {
1007 - if ($this->addInnerJoin('PAGE', $from, $db, $curtables)) { // try to add PAGE
 1072+ if ($this->addJoin('PAGE', $from, $db, $curtables)) { // try to add PAGE
10081073 $curtables['TEXT'] = 'txt' . SMWSQLStore::$m_tablenum++;
10091074 $from .= ' INNER JOIN ' . $db->tableName('smw_longstrings') . ' AS ' . $curtables['TEXT'] . ' ON ' . $curtables['TEXT'] . '.subject_id=' . $curtables['PAGE'] . '.page_id';
10101075 return true;
10111076 }
10121077 } elseif ($tablename == 'REDIRECT') {
1013 - if ($this->addInnerJoin('PAGE', $from, $db, $curtables)) { // try to add PAGE
 1078+ if ($this->addJoin('PAGE', $from, $db, $curtables)) { // try to add PAGE
10141079 $curtables['REDIRECT'] = 'rd' . SMWSQLStore::$m_tablenum++;
10151080 $from .= ' LEFT JOIN ' . $db->tableName('redirect') . ' AS ' . $curtables['REDIRECT'] . ' ON ' . $curtables['REDIRECT'] . '.rd_from=' . $curtables['PAGE'] . '.page_id';
10161081 return true;
10171082 }
10181083 } elseif ($tablename == 'REDIPAGE') { // add another copy of page for getting ids of redirect targets
1019 - if ($this->addInnerJoin('REDIRECT', $from, $db, $curtables)) {
 1084+ if ($this->addJoin('REDIRECT', $from, $db, $curtables)) {
10201085 $curtables['REDIPAGE'] = 'rp' . SMWSQLStore::$m_tablenum++;
10211086 $from .= ' INNER JOIN ' . $db->tableName('page') . ' AS ' . $curtables['REDIPAGE'] . ' ON (' .
10221087 $curtables['REDIRECT'] . '.rd_title=' . $curtables['REDIPAGE'] . '.page_title AND ' .
@@ -1062,23 +1127,23 @@
10631128 if ($description instanceof SMWThingDescription) {
10641129 // nothing to check
10651130 } elseif ($description instanceof SMWClassDescription) {
1066 - if ($this->addInnerJoin('CATS', $from, $db, $curtables)) {
1067 - global $smwgIQSubcategoryInclusions;
1068 - if ($smwgIQSubcategoryInclusions > 0) {
 1131+ if ($this->addJoin('CATS', $from, $db, $curtables)) {
 1132+ global $smwgQSubcategoryDepth;
 1133+ if ($smwgQSubcategoryDepth > 0) {
10691134 $ct = $this->getCategoryTable($description->getCategory()->getDBKey(), $db);
10701135 $from = '`' . $ct . '`, ' . $from;
1071 - $where = "$ct.cat_name=" . $curtables['CATS'] . '.cl_to';
 1136+ $where = "$ct.title=" . $curtables['CATS'] . '.cl_to';
10721137 } else {
10731138 $where .= $curtables['CATS'] . '.cl_to=' . $db->addQuotes($description->getCategory()->getDBKey());
10741139 }
10751140 }
10761141 } elseif ($description instanceof SMWNamespaceDescription) {
1077 - if ($this->addInnerJoin('PAGE', $from, $db, $curtables)) {
 1142+ if ($this->addJoin('PAGE', $from, $db, $curtables)) {
10781143 $where .= $curtables['PAGE'] . '.page_namespace=' . $db->addQuotes($description->getNamespace());
10791144 }
10801145 } elseif ($description instanceof SMWNominalDescription) {
1081 - global $smwgIQRedirectNormalization;
1082 - if ($smwgIQRedirectNormalization) {
 1146+ global $smwgQEqualitySupport;
 1147+ if ($smwgQEqualitySupport) {
10831148 $page = $this->getRedirectTarget($description->getIndividual(), $db);
10841149 } else {
10851150 $page = $description->getIndividual();
@@ -1088,7 +1153,7 @@
10891154 $db->addQuotes($page->getDBKey()) . ' AND ' .
10901155 $curtables['PREVREL'] . '.object_namespace=' .
10911156 $page->getNamespace();
1092 - if ( $smwgIQRedirectNormalization && ($this->addInnerJoin('REDIRECT', $from, $db, $curtables)) ) {
 1157+ if ( $smwgQEqualitySupport && ($this->addJoin('REDIRECT', $from, $db, $curtables)) ) {
10931158 $cond = '(' . $cond . ') OR (' .
10941159 $curtables['REDIRECT'] . '.rd_title=' .
10951160 $db->addQuotes($page->getDBKey()) . ' AND ' .
@@ -1096,7 +1161,7 @@
10971162 $page->getNamespace() . ')';
10981163 }
10991164 $where .= $cond;
1100 - } elseif ($this->addInnerJoin('PAGE', $from, $db, $curtables)) {
 1165+ } elseif ($this->addJoin('PAGE', $from, $db, $curtables)) {
11011166 $where .= $curtables['PAGE'] . '.page_title=' .
11021167 $db->addQuotes($page->getDBKey()) . ' AND ' .
11031168 $curtables['PAGE'] . '.page_namespace=' .
@@ -1107,7 +1172,7 @@
11081173 case 'text': // actually this should not happen; we cannot do anything here
11091174 break;
11101175 default:
1111 - if ( $this->addInnerJoin('ATTS', $from, $db, $curtables) ) {
 1176+ if ( $this->addJoin('ATTS', $from, $db, $curtables) ) {
11121177 switch ($description->getComparator()) {
11131178 case SMW_CMP_EQ: $op = '='; break;
11141179 case SMW_CMP_LEQ: $op = '<='; break;
@@ -1137,7 +1202,7 @@
11381203 $nexttables = array();
11391204 // pull in page to prevent every child description pulling it seperately!
11401205 /// TODO: will be obsolete when PREVREL provides page indices
1141 - if ($this->addInnerJoin('PAGE', $from, $db, $curtables)) {
 1206+ if ($this->addJoin('PAGE', $from, $db, $curtables)) {
11421207 $nexttables['PAGE'] = $curtables['PAGE'];
11431208 }
11441209 if (array_key_exists('PREVREL',$curtables)) {
@@ -1164,9 +1229,16 @@
11651230 }
11661231 }
11671232 } elseif ($description instanceof SMWSomeRelation) {
1168 - if ($this->addInnerJoin('RELS', $from, $db, $curtables)) {
1169 - $where .= $curtables['RELS'] . '.relation_title=' .
1170 - $db->addQuotes($description->getRelation()->getDBKey());
 1233+ if ($this->addJoin('RELS', $from, $db, $curtables)) {
 1234+ global $smwgQSubpropertyDepth;
 1235+ if ($smwgQSubpropertyDepth > 0) {
 1236+ $pt = $this->getPropertyTable($description->getRelation()->getDBKey(), $db);
 1237+ $from = '`' . $pt . '`, ' . $from;
 1238+ $where = "$pt.title=" . $curtables['RELS'] . '.relation_title';
 1239+ } else {
 1240+ $where .= $curtables['RELS'] . '.relation_title=' .
 1241+ $db->addQuotes($description->getRelation()->getDBKey());
 1242+ }
11711243 $nexttables = array( 'PREVREL' => $curtables['RELS'] );
11721244 $this->createSQLQuery($description->getDescription(), $from, $subwhere, $db, $nexttables, ($this->m_sortkey == $description->getRelation()->getDBKey()) );
11731245 if ( $subwhere != '') {
@@ -1177,21 +1249,29 @@
11781250 $id = SMWDataValueFactory::getAttributeObjectTypeID($description->getAttribute());
11791251 switch ($id) {
11801252 case 'text':
1181 - if ($this->addInnerJoin('TEXT', $from, $db, $curtables)) {
1182 - $where .= $curtables['TEXT'] . '.attribute_title=' .
1183 - $db->addQuotes($description->getAttribute()->getDBKey());
1184 - // no recursion: we do not support further conditions on text-type values
1185 - }
 1253+ $table = 'TEXT';
 1254+ $sub = false; //no recursion: we do not support further conditions on text-type values
11861255 break;
11871256 default:
1188 - if ($this->addInnerJoin('ATTS', $from, $db, $curtables)) {
1189 - $where .= $curtables['ATTS'] . '.attribute_title=' .
1190 - $db->addQuotes($description->getAttribute()->getDBKey());
1191 - $this->createSQLQuery($description->getDescription(), $from, $subwhere, $db, $curtables, ($this->m_sortkey == $description->getAttribute()->getDBKey()) );
1192 - if ( $subwhere != '') {
1193 - $where .= ' AND (' . $subwhere . ')';
1194 - }
 1257+ $table = 'ATTS';
 1258+ $sub = true;
 1259+ }
 1260+ if ($this->addJoin($table, $from, $db, $curtables)) {
 1261+ global $smwgQSubpropertyDepth;
 1262+ if ($smwgQSubpropertyDepth > 0) {
 1263+ $pt = $this->getPropertyTable($description->getAttribute()->getDBKey(), $db);
 1264+ $from = '`' . $pt . '`, ' . $from;
 1265+ $where = "$pt.title=" . $curtables[$table] . '.attribute_title';
 1266+ } else {
 1267+ $where .= $curtables[$table] . '.attribute_title=' .
 1268+ $db->addQuotes($description->getAttribute()->getDBKey());
 1269+ }
 1270+ if ($sub) {
 1271+ $this->createSQLQuery($description->getDescription(), $from, $subwhere, $db, $curtables, ($this->m_sortkey == $description->getAttribute()->getDBKey()) );
 1272+ if ( $subwhere != '') {
 1273+ $where .= ' AND (' . $subwhere . ')';
11951274 }
 1275+ }
11961276 }
11971277 }
11981278
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_Settings.php
@@ -55,6 +55,12 @@
5656 # Settings for inline queries (<ask>) and for semantic queries in general.
5757 # Especially meant to prevent overly high server-load by complex queries.
5858 ##
 59+$smwgQSubcategoryDepth = 10; // Restrict level of sub-category inclusion (steps within category hierarchy)
 60+$smwgQSubpropertyDepth = 10; // Restrict level of sub-property inclusion (steps within category hierarchy)
 61+// (Use 0 to disable hierarchy-inferencing in queries)
 62+$smwgQEqualitySupport = true; // Should #redirects be evaluated as equality between page names?
 63+
 64+## older query parameters below, some of those might be ignored
5965 $smwgIQEnabled = true; // (De)activates all query related features
6066 $smwgIQDefaultLinking = 'subject'; // Default linking behaviour. Can be one of "none", "subject", "all"
6167 $smwgIQSearchNamespaces = array(NS_MAIN, NS_IMAGE); // Which namespaces should be searched by default?
@@ -67,9 +73,7 @@
6874 $smwgIQMaxInlineLimit = 500; // Max number of rows printed in an inline query on a single page.
6975 $smwgIQDefaultLimit = 50; // Default number of rows returned in a query. Can be increased with <ask limit="num">...
7076 $smwgIQDisjunctiveQueriesEnabled = true; // Support disjunctions in queries (||)?
71 -$smwgIQSubcategoryInclusions = 10; // Restrict level of sub-category inclusion (steps within category hierarchy)
72 - // Use 0 to disable hierarchy-inferencing in queries
73 -$smwgIQRedirectNormalization = true; // Should redirects be interpreted as equivalence between page names?
 77+//$smwgIQRedirectNormalization = true; // Should redirects be interpreted as equivalence between page names?
7478 $smwgIQSortingEnabled = true; // (De)activate sorting of results.
7579 ##
7680

Status & tagging log