Skip to content

Instantly share code, notes, and snippets.

@nicemd
Created June 9, 2017 12:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicemd/cfc446e13e87ff33628ea03cd153c090 to your computer and use it in GitHub Desktop.
Save nicemd/cfc446e13e87ff33628ea03cd153c090 to your computer and use it in GitHub Desktop.
Systembolaget complete config
plugins:
- Elasticsearch
services:
elastic:
type: elasticsearch
url: "http://elasticsearch:9200"
api:
type: httplistener
path: search/{searchstring}
responseBody: json
pipelines:
-
when:
- { queue: started }
from:
- { http: "https://www.systembolaget.se/api/assortment/products/xml", format: xml }
do:
- { select: "$.artiklar.artikel[*]" }
to:
- { store: elastic, index: systembolaget, dataType: artikel, key: "#{Artikelid}" }
-
when:
- { api }
from:
- { search: elastic, index: systembolaget, dataType: artikel, value: "#{route.searchstring}" }
do:
- { select: "$.hits[*]" }
- { select, Name: "#{Namn}, #{Namn2}", Id: "#{Artikelid}" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment