example_demo4.html
11.6 KB
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Multi Tier Annotation Search</title>
<script type="text/javascript" src="./js/jquery-3.1.1.min.js"></script>
<script type="text/javascript" src="./js/solr.js"></script>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<h1>Multi Tier Annotation Search - example demo4 (CHAT examples)</h1>
<div>
Go to <a href="index.html">main page</a>.
</div>
<hr noshade />
<h3>Create index</h3>
Post to /solr/demo4/update
<div class="solr" data-type="json" data-url="/solr/demo4/update?wt=json&commitWithin=1000">
<div class="post"><textarea data-autoresize>[{ "id": "1","type": "chat","author":"Julie","title":"02-0_11_18","text":"chat-samples/Julie/02-0_11_18.xml" },
{ "id": "2","type": "chat","author":"Julie","title":"09-1_03_16","text":"chat-samples/Julie/09-1_03_16.xml" },
{ "id": "3","type": "chat","author":"Julie","title":"10-1_04_23","text":"chat-samples/Julie/10-1_04_23.xml" },
{ "id": "4","type": "chat","author":"Julie","title":"11-1_06_04","text":"chat-samples/Julie/11-1_06_04.xml" },
{ "id": "5","type": "chat","author":"Julie","title":"13-1_07_26","text":"chat-samples/Julie/13-1_07_26.xml" },
{ "id": "6","type": "chat","author":"Julie","title":"14-1_09_16","text":"chat-samples/Julie/14-1_09_16.xml" },
{ "id": "7","type": "chat","author":"Julie","title":"16-1_11_11","text":"chat-samples/Julie/16-1_11_11.xml" },
{ "id": "8","type": "chat","author":"Julie","title":"17-2_00_10","text":"chat-samples/Julie/17-2_00_10.xml" },
{ "id": "9","type": "chat","author":"Julie","title":"19-2_01_23","text":"chat-samples/Julie/19-2_01_23.xml" },
{ "id": "10","type": "chat","author":"Julie","title":"25-2_06_22","text":"chat-samples/Julie/25-2_06_22.xml" },
{ "id": "11","type": "chat","author":"Julie","title":"41-4_08_29","text":"chat-samples/Julie/41-4_08_29.xml" },
{ "id": "12","type": "chat","author":"Julie","title":"42-5_03_19","text":"chat-samples/Julie/42-5_03_19.xml" }]</textarea></div>
<input class="button post" type="button" value="create index" />
<input class="button reset" type="button" value="reset" />
<div class="output"></div>
<div class="error"></div>
</div>
<hr noshade />
<h3>Empty index</h3>
Post to /solr/demo4/update
<div class="solr" data-type="json" data-url="/solr/demo4/update?wt=json&commitWithin=1000">
<div class="post"><textarea data-autoresize>{
"delete": {
"query": "*:*"
}
}</textarea></div>
<input class="button post" type="button" value="delete index" />
<input class="button reset" type="button" value="reset" />
<div class="output"></div>
<div class="error"></div>
</div>
<hr noshade />
<h3>Query</h3>
<div>
Search for 'anniversaire' - classic; post to /solr/demo4/select
<div class="solr" data-type="post" data-url="/solr/demo4/select?indent=true&wt=json">
<div class="post"><textarea data-autoresize>q=text:*anniversaire*</textarea></div>
<input class="button post" type="button" value="post" />
<input class="button reset" type="button" value="reset" />
<div class="output"></div>
<div class="error"></div>
</div>
</div>
<br />
<div>
Search for 'anniversaire' - corpus query language (cql); post to /solr/demo4/select
<div class="solr" data-type="post" data-url="/solr/demo4/select?indent=true&wt=json">
<div class="post"><textarea data-autoresize>q={!mtas_cql field="text" query="[w=\"anniversaire\"]"}</textarea></div>
<input class="button post" type="button" value="post" />
<input class="button reset" type="button" value="reset" />
<div class="output"></div>
<div class="error"></div>
</div>
</div>
<hr noshade />
<h3>Basic stats</h3>
<div>
Get the number of positions; post to /solr/demo4/select
<div class="solr" data-type="post" data-url="/solr/demo4/select?indent=true&wt=json">
<div class="post"><textarea data-autoresize>q=*:*&rows=0&mtas=true&mtas.stats=true&mtas.stats.positions=true&mtas.stats.positions.0.key=number of positions&mtas.stats.positions.0.field=text&mtas.stats.positions.0.type=all</textarea></div>
<input class="button post" type="button" value="post" />
<input class="button reset" type="button" value="reset" />
<div class="output"></div>
<div class="error"></div>
</div>
</div>
<br />
<div>
Get the number of tokens; post to /solr/demo4/select
<div class="solr" data-type="post" data-url="/solr/demo4/select?indent=true&wt=json">
<div class="post"><textarea data-autoresize>q=*:*&rows=0&mtas=true&mtas.stats=true&mtas.stats.tokens=true&mtas.stats.tokens.0.key=number of tokens&mtas.stats.tokens.0.field=text&mtas.stats.tokens.0.type=all</textarea></div>
<input class="button post" type="button" value="post" />
<input class="button reset" type="button" value="reset" />
<div class="output"></div>
<div class="error"></div>
</div>
</div>
<br />
<div>
Get the number of nouns; post to /solr/demo4/select
<div class="solr" data-type="post" data-url="/solr/demo4/select?indent=true&wt=json">
<div class="post"><textarea data-autoresize>q=*:*&rows=0&mtas=true&mtas.stats=true&mtas.stats.spans=true&mtas.stats.spans.0.key=number of nouns&mtas.stats.spans.0.field=text&mtas.stats.spans.0.type=all&mtas.stats.spans.0.query.0.type=cql&mtas.stats.spans.0.query.0.value=[pos.c="n"]&mtas.stats.spans.0.function.0.key=fraction of nouns&mtas.stats.spans.0.function.0.expression=$q0/$n&mtas.stats.spans.0.function.0.type=all</textarea></div>
<input class="button post" type="button" value="post" />
<input class="button reset" type="button" value="reset" />
<div class="output"></div>
<div class="error"></div>
</div>
</div>
<hr noshade />
<h3>Kwic</h3>
Keyword in Context while searching for 'anniversaire'; post to /solr/demo4/select
<div>
<div class="solr" data-type="post" data-url="/solr/demo4/select?indent=true&wt=json">
<div class="post"><textarea data-autoresize>q={!mtas_cql field="text" query="[w=\"anniversaire\"]"}&mtas=true&mtas.kwic=true&mtas.kwic.0.field=text&mtas.kwic.0.query.type=cql&mtas.kwic.0.query.value=[w="anniversaire"]&mtas.kwic.0.prefix=w&mtas.kwic.0.output=hit&mtas.kwic.0.left=2&mtas.kwic.0.right=3&mtas.kwic.0.number=2&mtas.kwic.0.start=0</textarea></div>
<input class="button post" type="button" value="post" />
<input class="button reset" type="button" value="reset" />
<div class="output"></div>
<div class="error"></div>
</div>
</div>
<br />
Keyword in Context while searching for 'fête' followed by 'anniversaire' within 5 positions; post to /solr/demo4/select
<div>
<div class="solr" data-type="post" data-url="/solr/demo4/select?indent=true&wt=json">
<div class="post"><textarea data-autoresize>q={!mtas_cql field="text" query="[w=\"fête\"][]{0,4}[w=\"anniversaire\"]"}&mtas=true&mtas.kwic=true&mtas.kwic.0.field=text&mtas.kwic.0.query.type=cql&mtas.kwic.0.query.value=[w="fête"][]{0,4}[w="anniversaire"]&mtas.kwic.0.prefix=w,stem,pos.c,u,u.role,u.name,u.sex&mtas.kwic.0.output=token&mtas.kwic.0.left=0&mtas.kwic.0.right=0&mtas.kwic.0.number=2&mtas.kwic.0.start=0</textarea></div>
<input class="button post" type="button" value="post" />
<input class="button reset" type="button" value="reset" />
<div class="output"></div>
<div class="error"></div>
</div>
</div>
<hr noshade />
<h3>Termvector</h3>
Termvector of w with regexp [a-z]{5,*} for documents containing 'anniversaire'; post to /solr/demo4/select
<div>
<div class="solr" data-type="post" data-url="/solr/demo4/select?indent=true&wt=json">
<div class="post"><textarea data-autoresize>q={!mtas_cql field="text" query="[w=\"anniversaire\"]"}&mtas=true&mtas.termvector=true&mtas.termvector.0.field=text&mtas.termvector.0.prefix=w&mtas.termvector.0.key=termvector on w&mtas.termvector.0.type=n,sum,mean&mtas.termvector.0.sort.type=sum&mtas.termvector.0.sort.direction=desc&mtas.termvector.0.number=20&mtas.termvector.0.regexp=[a-z]{5,}</textarea></div>
<input class="button post" type="button" value="post" />
<input class="button reset" type="button" value="reset" />
<div class="output"></div>
<div class="error"></div>
</div>
</div>
<hr noshade />
<h3>Group</h3>
Group w for any verb followed by 'pas' en preceded by 'ne'; post to /solr/demo4/select
<div>
<div class="solr" data-type="post" data-url="/solr/demo4/select?indent=true&wt=json">
<div class="post"><textarea data-autoresize>q=*:*&rows=0&mtas=true&mtas.group=true&mtas.group.0.field=text&mtas.group.0.query.type=cql&mtas.group.0.query.value=([pos.c="v"] followedby [w="pas"]) precededby [w="ne"]&mtas.group.0.grouping.hit.inside.prefixes=w</textarea></div>
<input class="button post" type="button" value="post" />
<input class="button reset" type="button" value="reset" />
<div class="output"></div>
<div class="error"></div>
</div>
</div>
<br/>
Group w for any verb followed by 'pas' en preceded by 'ne' and used by Mother; post to /solr/demo4/select
<div>
<div class="solr" data-type="post" data-url="/solr/demo4/select?indent=true&wt=json">
<div class="post"><textarea data-autoresize>q=*:*&rows=0&mtas=true&mtas.group=true&mtas.group.0.field=text&mtas.group.0.query.type=cql&mtas.group.0.query.value=(([pos.c="v"] followedby [w="pas"]) precededby [w="ne"]) within <u.role="Mother">&mtas.group.0.grouping.hit.inside.prefixes=w</textarea></div>
<input class="button post" type="button" value="post" />
<input class="button reset" type="button" value="reset" />
<div class="output"></div>
<div class="error"></div>
</div>
</div>
<br/>
Group u.role and w for any verb followed by 'pas' en preceded by 'ne'; post to /solr/demo4/select
<div>
<div class="solr" data-type="post" data-url="/solr/demo4/select?indent=true&wt=json">
<div class="post"><textarea data-autoresize>q=*:*&rows=0&mtas=true&mtas.group=true&mtas.group.0.field=text&mtas.group.0.query.type=cql&mtas.group.0.query.value=([pos.c="v"] followedby [w="pas"]) precededby [w="ne"]&mtas.group.0.grouping.hit.inside.prefixes=u.role,w</textarea></div>
<input class="button post" type="button" value="post" />
<input class="button reset" type="button" value="reset" />
<div class="output"></div>
<div class="error"></div>
</div>
</div>
<hr noshade />
<h3>Prefixes</h3>
Available prefixes; post to /solr/demo4/select
<div>
<div class="solr" data-type="post" data-url="/solr/demo4/select?indent=true&wt=json">
<div class="post"><textarea data-autoresize>q=*:*&rows=0&mtas=true&mtas.prefix=true&mtas.prefix.0.field=text&mtas.prefix.0.key=prefixes</textarea></div>
<input class="button post" type="button" value="post" />
<input class="button reset" type="button" value="reset" />
<div class="output"></div>
<div class="error"></div>
</div>
</div>
<hr noshade />
<div>
Go to <a href="index.html">main page</a>.
</div>
</body>
</html>