Skip to content

Instantly share code, notes, and snippets.

@imotov
Created December 17, 2012 18:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save imotov/4320493 to your computer and use it in GitHub Desktop.
Save imotov/4320493 to your computer and use it in GitHub Desktop.
curl -XPUT 'http://localhost:9200/test50k' -d '{
"settings": {
"analysis": {
"analyzer": {
"my_analyzer": {
"type": "custom",
"tokenizer": "standard",
"filter": "standard, lowercase, hunspell_hr"
}
},
"filter": {
"hunspell_hr": {
"type": "hunspell",
"locale": "hr_HR",
"ignoreCase": "true"
}
}
}
}
}
'
curl -XPUT 'http://localhost:9200/test50k/concepts/_mapping' -d '{
"concepts": {
"properties": {
"description": {
"type": "string",
"analyzer": "my_analyzer"
}
}
}
}
'
curl -XPUT 'http://localhost:9200/test50k/concepts/1' -d '{
"name": "miki",
"description": "mi bi smo voljeli da nađemo kuće u centru grada. Jer volimo da imamo vrt a i da su nam blizu objekti kulture."
}
'
curl -XPOST 'http://localhost:9200/test50k/_refresh'
curl -s 'http://localhost:9200/test50k/concepts/_search?pretty=true' -d '{"query": {"query_string": {"query": "description:kuća"}}}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment