Skip to content

Instantly share code, notes, and snippets.

@razorcd
Created May 17, 2017 07:12
Show Gist options
  • Save razorcd/d1bf79d11bfb660d95d40855ee51deb8 to your computer and use it in GitHub Desktop.
Save razorcd/d1bf79d11bfb660d95d40855ee51deb8 to your computer and use it in GitHub Desktop.
ES Java - Spring settings
// more:
// https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/annotations/Setting.java
@Setting(settingPath = "es-default-settings.json")
@Mapping(mappingPath = "es-default-mappings.json")
public class DefaultEntity {
}
{
"type": "string",
"fields": {
"content": {
"type": "string",
"term_vector":"with_positions_offsets",
"store": true
}
}
}
{
"index": {
"number_of_shards": "1",
"number_of_replicas": "0",
"analysis": {
"analyzer": {
"default" : {
"type" : "keyword"
},
//or:
"emailAnalyzer": {
"type": "custom",
"tokenizer": "uax_url_email"
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment