Last active
December 31, 2015 15:39
-
-
Save dadoonet/8008466 to your computer and use it in GitHub Desktop.
Elision test for https://groups.google.com/d/msgid/elasticsearch-fr/760f479d-60b7-4855-a663-7fbf0a24a8b7%40googlegroups.com
This file contains hidden or 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
# Delete the index `testindex` | |
curl -XDELETE 'http://localhost:9200/test' ; echo | |
# Create the index `testindex` | |
curl -XPUT 'http://localhost:9200/test' -d '{ | |
"settings" : { | |
"index" : { | |
"number_of_shards" : 1, | |
"number_of_replicas" : 0 | |
}, | |
"analysis" : { | |
"analyzer" : { | |
"default" : { | |
"tokenizer" : "standard", | |
"filter" : ["standard", "elision"] | |
} | |
}, | |
"filter" : { | |
"elision" : { | |
"type" : "elision", | |
"articles" : ["l", "m", "t", "qu", "n", "s", "j"] | |
} | |
} | |
} | |
} | |
}' ; echo | |
# Wait for yellow | |
curl -XGET 'http://localhost:9200/_cluster/health?wait_for_status=yellow' ; echo | |
# Testing Elision filter | |
# http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/analysis-elision-tokenfilter.html | |
# analyze it | |
curl -XPOST 'http://localhost:9200/test/_analyze?analyzer=default&pretty' -d "l'avion" ; echo |
This file contains hidden or 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
{ | |
"tokens" : [ { | |
"token" : "avion", | |
"start_offset" : 0, | |
"end_offset" : 7, | |
"type" : "<ALPHANUM>", | |
"position" : 1 | |
} ] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment