Skip to content

Instantly share code, notes, and snippets.

@dmregister
Created June 25, 2015 18:42
Show Gist options
  • Save dmregister/dcce0d7cb8d02b6e1cfc to your computer and use it in GitHub Desktop.
Save dmregister/dcce0d7cb8d02b6e1cfc to your computer and use it in GitHub Desktop.
es mapping with context path
#mapping
"statusForSuggest": {
"type": "object",
"properties": {
"isVisible":{
"type": "boolean"
},
"status":{
"type": "string"
},
"source":{
"type": "string"
}
}
},
"suggester": {
"type": "completion",
"analyzer": "standard",
"payloads": true,
"preserve_separators": true,
"preserve_position_increments": true,
"max_input_length": 500,
"context": {
"type": {
"type": "category",
"path": "statusForSuggest",
"default": []
}
}
},
#document
statusForSuggest: {
"isVisible" : true,
"source" : "test",
"status" : "active"
},
"suggester" : {
"input" : [
"testing",
"tester"
],
"payload" : {
"id" : "1",
"category" : "test"
},
"output" : "cool test"
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment