mirror of
https://github.com/grafana/grafana.git
synced 2025-02-12 16:45:43 -06:00
Added mapping to load.sh
This commit is contained in:
parent
b3052d0c95
commit
54752ce05b
@ -1,6 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
echo "Generating bulk indexable shakespeare lines with timestamp 3 hours in the past and 5 hours into the future"
|
||||
node reader.js > indexme.json
|
||||
echo "Setting mapping for shakespeare index"
|
||||
curl -XPUT http://localhost:9200/_template/shakespeare -d '
|
||||
{
|
||||
"template" : "shakespeare",
|
||||
"mappings" : {
|
||||
"_default_" : {
|
||||
"properties" : {
|
||||
"clientip" : { "type" : "ip" },
|
||||
"speaker" : {"type": "string", "index" : "not_analyzed" },
|
||||
"play_name" : {"type": "string", "index" : "not_analyzed" },
|
||||
"line_id" : { "type" : "integer", "index": "not_analyzed" },
|
||||
"speech_number" : { "type" : "integer", "index": "not_analyzed" },
|
||||
"country" : {"type": "string", "index" : "not_analyzed" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
'
|
||||
echo
|
||||
echo "Performing bulk indexing into localhost:9200"
|
||||
curl -XPUT localhost:9200/_bulk --data-binary @indexme.json;echo
|
||||
echo
|
||||
|
Loading…
Reference in New Issue
Block a user