Issue/4965
De Semantic MediaWiki - Sandbox
When you try to show the inverse relationship in a printout followed by the non-inverse of that same relationship in the same query, the first direction is used for both.
If you use the non-inverse relationship followed by the inverse, the same problem occurs.
In SMW 2.5.7 you can use both directions in one query
Located in | -Located in | |
---|---|---|
Athens | Greece | Greece |
Greece |
-Located in | Located in | |
---|---|---|
Athens | ||
Greece | Passau Athens | Passau Athens |
Inverse | Normal direction | |
---|---|---|
Athens | ||
Greece | Passau Athens | Passau Athens |
-Located in | Capital of | -Capital of | |
---|---|---|---|
Athens | Greece | Greece | |
Greece | Passau Athens |
First query in ul-format[modifier | modifier le wikicode]
Shows how the issue is not specific to broadtable
First query in debug format[modifier | modifier le wikicode]
Debug outputElasticStore{ "smw": { "query": "[[Athens]] OR [[Greece]]", "sort": { "": "ASC" }, "metrics": { "query size": 2, "query depth": 0 }, "description_log": [ { "Disjunction": " <q>[[:Athens]] OR [[:Greece]]</q> " }, [ { "ValueDescription": "[[:Athens]]" } ], [ { "ValueDescription": "[[:Greece]]" } ] ] }, "elastic": [ { "index": "smw-data-db9910120150926-02100_", "type": "data", "body": { "_source": false, "from": 0, "size": 251, "query": { "constant_score": { "filter": { "bool": { "should": [ { "bool": { "must": { "terms": { "_id": [ 1912 ] } } } }, { "bool": { "must": { "terms": { "_id": [ 1910 ] } } } } ] } } } }, "sort": [ { "subject.sortkey.sort": { "order": "asc" }, "subject.title.sort": { "order": "asc" } } ] } }, { "_shards": { "total": 1, "successful": 1, "failed": 0 }, "valid": true, "explanations": [ { "index": "smw-data-db9910120150926-02100_-v1", "valid": true, "explanation": "+ConstantScore(((+_id:([fe 19 12])) (+_id:([fe 19 10])))~1) #*:*" } ] } ] }
Second query in debug format[modifier | modifier le wikicode]
Debug outputElasticStore{ "smw": { "query": "[[Athens]] OR [[Greece]]", "sort": { "": "ASC" }, "metrics": { "query size": 2, "query depth": 0 }, "description_log": [ { "Disjunction": " <q>[[:Athens]] OR [[:Greece]]</q> " }, [ { "ValueDescription": "[[:Athens]]" } ], [ { "ValueDescription": "[[:Greece]]" } ] ] }, "elastic": [ { "index": "smw-data-db9910120150926-02100_", "type": "data", "body": { "_source": false, "from": 0, "size": 251, "query": { "constant_score": { "filter": { "bool": { "should": [ { "bool": { "must": { "terms": { "_id": [ 1912 ] } } } }, { "bool": { "must": { "terms": { "_id": [ 1910 ] } } } } ] } } } }, "sort": [ { "subject.sortkey.sort": { "order": "asc" }, "subject.title.sort": { "order": "asc" } } ] } }, { "_shards": { "total": 1, "successful": 1, "failed": 0 }, "valid": true, "explanations": [ { "index": "smw-data-db9910120150926-02100_-v1", "valid": true, "explanation": "+ConstantScore(((+_id:([fe 19 12])) (+_id:([fe 19 10])))~1) #*:*" } ] } ] }