-
Notifications
You must be signed in to change notification settings - Fork 18
ElasticSearch Public API
SNG is providing public readonly access to the Webumenia ElasticSearch index.
URL is: https://www.webumenia.sk/api/
You can request the credentials by contacting us at lab@sng.sk
To learn more about using ElasticSearch you can read the official ES documentation or our presentation (in Slovak).
The route is forwarded directly to the index /items_sk
(no need to specify it).
It's generated by the script SetupElasticsearch.php
It contains index types: items
and authorities
, with their respective en
, sk
, and cz
translations, i.e. items_en
, items_sk
, authorities_cs
etc.
You can list all indices with their mapping with curl -XGET -u {username}:{password} 'https://www.webumenia.sk/api/*/_mapping?pretty=true'
Available analyzers:
ascii_folding
-
autocomplete
(being used together withascii_folding
for search suggestions) -
slovencina
apply stopwords + lemmatization + asciifolding -
slovencina_synonym
same as above but adds synonyms
For many properties we use multi_fields.
-
<field>
is most usuallynot_analyzed
for exact match or filters & aggregations (query must be exact, e.g. "Štúdia sediaceho muža") -
<field>.folded
useascii_folding
to support search without diacritics (e.g. "studia sediaceho muza") -
<field>.stemmed
useslovencina
to support search lemmatization (e.g. "sediaci muz")
Search for public domain artworks:
curl -XGET -u {username}:{password} 'https://www.webumenia.sk/api/items_sk/_search?q=is_free:true'
search across all translations:
curl -XGET -u {username}:{password} 'https://www.webumenia.sk/api/items_*/_search?q=is_free:true'
or with the query parameters specified as a data object:
curl -XGET -u {username}:{password} https://www.webumenia.sk/api/items_sk/_search -d '{
"query": {
"bool": {
"must": [
{ "term": { "is_free": true } }
]
}
}
}'