Created
August 8, 2011 04:53
-
-
Save sbeckeriv/1131225 to your computer and use it in GitHub Desktop.
Exact matching
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
Using ES 17.4 | |
I want to get the exact match for matt. I am seeing matt-, matt, matt-cat... | |
curl -Xget 'http://localhost:9200/g/_search?pretty=true' -d '{"query":{"term": { "username": "matt"}}}' | |
the mapping # Im using Tire for ruby. I dont know the mapping syntax. | |
{ | |
"g" : { | |
"document" : { | |
"properties" : { | |
"id" : { | |
"type" : "long" | |
}, | |
"username" : { | |
"type" : "string" | |
}, | |
} | |
}, | |
"person" : { | |
"properties" : { | |
"username" : { | |
"index" : "not_analyzed", | |
"store" : "yes", | |
"type" : "string" | |
} | |
} | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment