Blame view

docker/site/example_demo1.html 8.72 KB
Matthijs Brouwer authored
1
2
3
4
5
6
7
8
9
10
11
12
13
<!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 demo1</h1>
Matthijs Brouwer authored
14
15
16
17
18
19

    <div>
      Go to <a href="index.html">main page</a>.
    </div>         

    <hr noshade /> 
Matthijs Brouwer authored
20
21
22

    <h3>Create index</h3>
    Post to /solr/demo1/update
Matthijs Brouwer authored
23
24
    <div class="solr" data-type="json" data-url="/solr/demo1/update?wt=json&commitWithin=1000">
      <div class="post"><textarea data-autoresize>[{ "id": "1","author":"Nicolaas Beets","title":"Een onaangenaam mens in de Haarlemmerhout","text":"folia-samples/beets1.xml" },
Matthijs Brouwer authored
25
{ "id": "2","author":"Nicolaas Beets","title":"Een oude kennis","text":"folia-samples/beets2.xml" },
Matthijs Brouwer authored
26
27
28
29
30
31
32
33
{ "id": "3","author":"Nicolaas Beets","title":"Varen en Rijden","text":"folia-samples/beets3.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 /> 
Matthijs Brouwer authored
34
35
36

    <h3>Empty index</h3>
    Post to /solr/demo1/update
Matthijs Brouwer authored
37
38
    <div class="solr" data-type="json" data-url="/solr/demo1/update?wt=json&commitWithin=1000">
      <div class="post"><textarea data-autoresize>{
Matthijs Brouwer authored
39
40
41
  "delete": {
    "query": "*:*"
  }
Matthijs Brouwer authored
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
}</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 everything - classic; post to /solr/demo1/select
      <div class="solr" data-type="post" data-url="/solr/demo1/select?indent=true&wt=json">
        <div class="post"><textarea data-autoresize>q=*:*</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 />
Matthijs Brouwer authored
65
Matthijs Brouwer authored
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
    <div>
      Search for 'spoorwegen' - classic; post to /solr/demo1/select
      <div class="solr" data-type="post" data-url="/solr/demo1/select?indent=true&wt=json">
        <div class="post"><textarea data-autoresize>q=text:spoorwegen</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 'spoorwegen' - corpus query language (cql); post to /solr/demo1/select
      <div class="solr" data-type="post" data-url="/solr/demo1/select?indent=true&wt=json">
        <div class="post"><textarea data-autoresize>q={!mtas_cql field="text" query="[t=\"spoorwegen\"]"}</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 /> 
Matthijs Brouwer authored
91
92
93

    <h3>Basic stats</h3>
Matthijs Brouwer authored
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
    <div>
	    Get the number of positions; post to /solr/demo1/select
	    <div class="solr" data-type="post" data-url="/solr/demo1/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/demo1/select
      <div class="solr" data-type="post" data-url="/solr/demo1/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/demo1/select
      <div class="solr" data-type="post" data-url="/solr/demo1/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="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 'spoorwegen'; post to /solr/demo1/select 
Matthijs Brouwer authored
136
Matthijs Brouwer authored
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
    <div>
      <div class="solr" data-type="post" data-url="/solr/demo1/select?indent=true&wt=json">
        <div class="post"><textarea data-autoresize>q=text:spoorwegen&mtas=true&mtas.kwic=true&mtas.kwic.0.field=text&mtas.kwic.0.query.type=cql&mtas.kwic.0.query.value=[t="spoorwegen"]&mtas.kwic.0.prefix=t,pos,lemma&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> 

    <hr noshade /> 

    <h3>Termvector</h3>

    Termvector of t_lc with regexp [a-z]{5,*} for documents containing 'spoorwegen'; post to /solr/demo1/select 

    <div>
      <div class="solr" data-type="post" data-url="/solr/demo1/select?indent=true&wt=json">
        <div class="post"><textarea data-autoresize>q=text:spoorwegen&mtas=true&mtas.termvector=true&mtas.termvector.0.field=text&mtas.termvector.0.prefix=t_lc&mtas.termvector.0.key=termvector on t_lc&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 t_lc for adjectives within sentences containing a word with lemma 'spoorweg'; post to /solr/demo1/select 

    <div>
      <div class="solr" data-type="post" data-url="/solr/demo1/select?indent=true&wt=json">
        <div class="post"><textarea data-autoresize>q={!mtas_cql field="text" query="[lemma=\"spoorweg\"]"}&mtas=true&mtas.group=true&mtas.group.0.field=text&mtas.group.0.query.type=cql&mtas.group.0.query.value=([pos="ADJ"]) within (<s/> containing [lemma="spoorweg"])&mtas.group.0.grouping.hit.inside.prefixes=t_lc</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/demo1/select 

    <div>
      <div class="solr" data-type="post" data-url="/solr/demo1/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>
Matthijs Brouwer authored
198
      Go to <a href="index.html">main page</a>.
Matthijs Brouwer authored
199
200
    </div>
Matthijs Brouwer authored
201
202
  </body>
</html>