-
-
Save goyaweb/1000276 to your computer and use it in GitHub Desktop.
stemming and synonyms doesn't work
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": { | |
"index": { | |
"filter": [ | |
"standard", | |
"lowercase", | |
"my_synonym", | |
"my_snow" | |
], | |
"tokenizer": "standard" | |
}, | |
"search": { | |
"filter": [ | |
"standard", | |
"lowercase", | |
"stop" | |
], | |
"tokenizer": "standard" | |
} | |
} | |
} | |
} | |
}' | |
curl -XPOST localhost:9200/mps/mp/ -d '{ | |
"content":"\n\nKeynotes\nSoreness of the lower extremities.\nFeels abandoned." | |
}' | |
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