Skip to content

Instantly share code, notes, and snippets.

@jamilatta
Created January 27, 2015 18:27
Show Gist options
  • Save jamilatta/c997b4864709a80a61f9 to your computer and use it in GitHub Desktop.
Save jamilatta/c997b4864709a80a61f9 to your computer and use it in GitHub Desktop.
Mappnig of icatman index
DELETE /icatman
PUT /icatman
PUT /icatman/article/_mapping
{
"article" : {
"_timestamp" : {
"enabled" : true,
"store" : true
},
"properties" : {
"abbrev_journal_title": {"type": "string", "store": true},
"epub": {"type": "string", "index": "analyzed"},
"ppub": {"type": "string", "index": "analyzed"},
"volume": {"type": "integer"},
"issue": {"type": "integer"},
"year": {"type": "string"},
"doi": {"type": "string", "index": "analyzed"},
"pid": {"type": "string", "index": "analyzed"},
"is_aop": {"type": "boolean"},
"article_type": {"type": "string"},
"source": {"type": "string"},
"b64_source" : {"type" : "attachment"}
}
}
}
@jfunez
Copy link

jfunez commented Jan 27, 2015

{
"article" : {
"dynamic": "strict", 
"_timestamp" : {
"enabled" : true,
"store" : true
},
"properties" : {
"abbrev_journal_title": {"type": "string", "store": true},
"epub": {"type": "string", "index": "analyzed"},
"ppub": {"type": "string", "index": "analyzed"},
"volume": {"type": "integer"},
"issue": {"type": "integer"},
"year": {"type": "string"},
"doi": {"type": "string", "index": "analyzed"},
"pid": {"type": "string", "index": "analyzed"},
"is_aop": {"type": "boolean"},
"article_type": {"type": "string"},
"source": {"type": "string"},
"b64_source" : {"type" : "attachment"},
"head_subject": {"type": "string"}
}
}
} 

@jfunez
Copy link

jfunez commented Jan 27, 2015

curl -X PUT "http://192.168.169.134:9200/icatman"

curl -X PUT "http://192.168.169.134:9200/icatman/article/_mapping" -d '{"article" : {"dynamic": "strict", "_timestamp" : {"enabled" : true, "store" : true }, "properties" : {"abbrev_journal_title": {"type": "string", "store": true}, "epub": {"type": "string", "index": "analyzed"}, "ppub": {"type": "string", "index": "analyzed"}, "volume": {"type": "integer"}, "issue": {"type": "integer"}, "year": {"type": "string"}, "doi": {"type": "string", "index": "analyzed"}, "pid": {"type": "string", "index": "analyzed"}, "is_aop": {"type": "boolean"}, "article_type": {"type": "string"}, "source": {"type": "string"}, "b64_source" : {"type" : "attachment"}, "head_subject": {"type": "string"} } } }'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment