Created
July 24, 2012 15:48
-
-
Save alfetopito/3170803 to your computer and use it in GitHub Desktop.
ElasticSearch Mappings and Analyzer
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
# Mappings | |
curl -XGET 'http://localhost:9200/tokens,keywords/_mapping?pretty=true' | |
{ | |
"keywords" : { | |
"pt_BR" : { | |
"properties" : { | |
"keyword" : { | |
"type" : "string", | |
"boost" : 10.0, | |
"analyzer" : "keyword", | |
"store" : "yes", | |
"null_value" : "" | |
} | |
} | |
} | |
}, | |
"tokens" : { | |
"pt_BR" : { | |
"properties" : { | |
"keyword" : { | |
"type" : "string", | |
"boost" : 10.0, | |
"analyzer" : "token_analyzer" | |
} | |
} | |
} | |
} | |
} | |
# Analyzer | |
"analyzer": { | |
"token_analyzer": { | |
"type": "brazilian", | |
# just a few stopwords | |
"stop_words": ["de", "a", "o", "que", "e", "do", "da", "em"], | |
"tokenizer": "standard" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment