Skip to content

Instantly share code, notes, and snippets.

@polyfractal
Last active December 13, 2015 19:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save polyfractal/4959909 to your computer and use it in GitHub Desktop.
Save polyfractal/4959909 to your computer and use it in GitHub Desktop.
Mapping for indexing throughput benchmark
{
"settings": {
"number_of_shards": 3,
"number_of_replicas": 0,
"index": {
"analysis": {
"analyzer": {
"analyzer_shingle": {
"tokenizer": "standard",
"filter": [
"standard",
"lowercase",
"filter_shingle"
]
}
},
"filter": {
"filter_shingle": {
"type": "shingle",
"max_shingle_size": 5,
"min_shingle_size": 2,
"output_unigrams": "true"
}
}
}
}
},
"mappings": {
"benchmark": {
"properties": {
"field1": {
"search_analyzer": "analyzer_shingle",
"index_analyzer": "analyzer_shingle",
"type": "string"
},
"field2": {
"search_analyzer": "analyzer_shingle",
"index_analyzer": "analyzer_shingle",
"type": "string"
}
}
}
}
}
#example document
{
_index: test
_type: benchmark
_id: E1JW0xguQ1mpWsNmvotToA
_version: 1
_score: 1
_source: {
timestamp: 1360901831
field1: stick yet kind magnet boy held space least steel person foot case doctor true . shoulder any they six division land milk world enter cut wrote interest notice stood continent die visit these that hill case clean done fun run final unit high observe mouth hill corner produce serve winter board learn exercise rope possible body large necessary page tube operate floor ask early path hot forest crowd square written repeat tell bank think girl solve bring miss watch little allow air song take chief sharp five east did children wish listen length add laugh saw water page some surprise have
field2: stick yet kind magnet boy held space least steel person foot case doctor true . shoulder any they six division land milk world enter cut wrote interest notice stood continent die visit these that hill case clean done fun run final unit high observe mouth hill corner produce serve winter board learn exercise rope possible body large necessary page tube operate floor ask early path hot forest crowd square written repeat tell bank think girl solve bring miss watch little allow air song take chief sharp five east did children wish listen length add laugh saw water page some surprise have
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment