Skip to content

Instantly share code, notes, and snippets.

@pcdinh
Created April 17, 2011 08:19
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 pcdinh/923848 to your computer and use it in GitHub Desktop.
Save pcdinh/923848 to your computer and use it in GitHub Desktop.
Syntax is OK
============
curl -X POST "http://localhost:9200/accdev/exp/_search?pretty=true" -d '{
"query": {
"fuzzy" : {
"username" : {
"value" : "pcdinh",
"boost" : 1.0,
"min_similarity" : 0.5,
"prefix_length" : 3
}
}
}
}'
Syntax is not OK
================
curl -X POST "http://localhost:9200/accdev/exp/_search?pretty=true" -d '{
"query": {
"fuzzy" : {
"username" : {
"value" : "pcdin",
"boost" : 1.0,
"min_similarity" : 0.5,
"prefix_length" : 0
},
"fullname_idx": {
"value": "pcdin",
"min_similarity": 0.1,
"prefix_length": 1,
"boost": 3.0
}
}
}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment