Created
December 17, 2012 18:11
-
-
Save imotov/4320493 to your computer and use it in GitHub Desktop.
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 '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