-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from ChannelFinder/Issue_20
#20 adding a new mapping file for es 7.X
- Loading branch information
Showing
1 changed file
with
94 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}' |