Skip to content

Instantly share code, notes, and snippets.

@goyaweb
Created June 3, 2011 15:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save goyaweb/1006503 to your computer and use it in GitHub Desktop.
Save goyaweb/1006503 to your computer and use it in GitHub Desktop.
Cannot apply analyzers
curl -XPUT localhost:9200/mps/ -d '{
"index": {
"analysis": {
"filter": {
"my_synonym": {
"synonyms_path": "analysers/synonyms_a_short.txt",
"ignore_case": true,
"type": "synonym"
},
"my_snow": {
"type": "snowball",
"language": "English"
}
},
"analyzer": {
"default": {
"filter": [
"standard",
"lowercase",
"my_synonym",
"my_snow"
],
"tokenizer": "standard"
}
}
}
}
}'
curl -XPOST localhost:9200/mps/mp/ -d '{
"content":"\n\nKeynotes\nSoreness of the lower extremities.\nFeels abandoned."
}'
curl -XPOST http://localhost:9200/mps/_refresh
curl -XPOST localhost:9200/mps/_search -d '{
"query":{
"bool":{
"must":[
{
"term":{
"content":"extremity"
}
}
]
}
}
}'
curl -XPOST localhost:9200/mps/_search -d '{
"query":{
"bool":{
"must":[
{
"term":{
"content":"lost"
}
}
]
}
}
}'
abandoned,isolated,isolation,forsaken,alone,helpless,helplessness,estranged,lost,lonely,lonesome,solitude,loss,losses
agoraphobia,crowd,crowds,crowded,throng,multitude,street,public,open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment