Skip to content

Commit

Permalink
Merge pull request #45 from ChannelFinder/Issue_20
Browse files Browse the repository at this point in the history
#20 adding a new mapping file for es 7.X
  • Loading branch information
shroffk authored Mar 7, 2022
2 parents 9eabac2 + 9d92273 commit 4dc8567
Showing 1 changed file with 94 additions and 0 deletions.
94 changes: 94 additions & 0 deletions src/main/resources/es7_mapping_definitions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
#!/bin/sh

es_host=localhost
es_port=9200

###
# #%L
# ChannelFinder Directory Service
# %%
# Copyright (C) 2010 - 2016 Helmholtz-Zentrum Berlin für Materialien und Energie GmbH
# %%
# Copyright (C) 2010 - 2012 Brookhaven National Laboratory
# All rights reserved. Use is subject to license terms.
# #L%
###
# The mapping definition for the Indexes associated with the channelfinder v4


#Create the Index
curl -H 'Content-Type: application/json' -XPUT http://${es_host}:${es_port}/cf_tags?include_type_name=true -d'
{
"mappings":{
"cf_tag" : {
"properties" : {
"name" : {
"type" : "keyword"
},
"owner" : {
"type" : "keyword"
}
}
}
}
}'

curl -H 'Content-Type: application/json' -XPUT http://${es_host}:${es_port}/cf_properties?include_type_name=true -d'
{
"mappings":{
"cf_property" : {
"properties" : {
"name" : {
"type" : "keyword"
},
"owner" : {
"type" : "keyword"
}
}
}
}
}'

curl -H 'Content-Type: application/json' -XPUT http://${es_host}:${es_port}/channelfinder?include_type_name=true -d'
{
"mappings":{
"cf_channel" : {
"properties" : {
"name" : {
"type" : "keyword"
},
"owner" : {
"type" : "keyword"
},
"script" : {
"type" : "keyword"
},
"properties" : {
"type" : "nested",
"properties" : {
"name" : {
"type" : "keyword"
},
"owner" : {
"type" : "keyword"
},
"value" : {
"type" : "keyword"
}
}
},
"tags" : {
"type" : "nested",
"properties" : {
"name" : {
"type" : "keyword"
},
"owner" : {
"type" : "keyword"
}
}
}
}
}
}
}'

0 comments on commit 4dc8567

Please sign in to comment.