1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
{
"description": "Test `[[Has subobject::!]]` / `[[Has subobject::!+]]` (ES only)",
"setup": [
{
"namespace": "SMW_NS_PROPERTY",
"page": "Has page",
"contents": "[[Has type::Page]]"
},
{
"page": "Q1205/1",
"contents": "[[Has page::Q1205]] {{#subobject: |Has page=Q1205/1}} {{#subobject: |Has page=Q1205/2}}"
}
],
"tests": [
{
"type": "query",
"about": "#0",
"skip-on": {
"elastic": [ "not", "Only works with ES out of the box." ]
},
"condition": "[[Has page::in:Q1205]]",
"printouts": [],
"parameters": {
"limit": "10"
},
"assert-queryresult": {
"count": 3,
"results": [
"Q1205/1#0##",
"Q1205/1#0##_05d38f45f2ea3d1167f4c7c0d52f82d2",
"Q1205/1#0##_da6807dde88fa7a579fd5beed7b182cd"
]
}
},
{
"type": "query",
"about": "#1 (Has subobject::!, match entities with no subobject)",
"skip-on": {
"elastic": [ "not", "Only works with ES out of the box." ]
},
"condition": "[[Has page::in:Q1205]][[Has subobject::!]]",
"printouts": [],
"parameters": {
"limit": "10"
},
"assert-queryresult": {
"count": 1,
"results": [
"Q1205/1#0##"
]
}
},
{
"type": "query",
"about": "#2 (Has subobject::+, those entities that poses a subobject)",
"skip-on": {
"elastic": [ "not", "Only works with ES out of the box." ]
},
"condition": "[[Has page::in:Q1205]][[Has subobject::+]]",
"printouts": [],
"parameters": {
"limit": "10"
},
"assert-queryresult": {
"count": 1,
"results": [
"Q1205/1#0##"
]
}
},
{
"type": "query",
"about": "#3 (Has subobject::!+, those entities that don't poses a subobject)",
"skip-on": {
"elastic": [ "not", "Only works with ES out of the box." ]
},
"condition": "[[Has page::in:Q1205]][[Has subobject::!+]]",
"printouts": [],
"parameters": {
"limit": "10"
},
"assert-queryresult": {
"count": 2,
"results": [
"Q1205/1#0##_05d38f45f2ea3d1167f4c7c0d52f82d2",
"Q1205/1#0##_da6807dde88fa7a579fd5beed7b182cd"
]
}
}
],
"settings": {
"smwgNamespacesWithSemanticLinks": {
"NS_MAIN": true,
"SMW_NS_PROPERTY": true
}
},
"meta": {
"version": "2",
"is-incomplete": false,
"debug": false
}
}
|