Created
June 3, 2011 15:16
-
-
Save goyaweb/1006503 to your computer and use it in GitHub Desktop.
Cannot apply analyzers
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
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" | |
} | |
} | |
] | |
} | |
} | |
}' |
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
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