Skip to content

Commit

Permalink
update doc for phrase query
Browse files Browse the repository at this point in the history
  • Loading branch information
medcl committed Jan 24, 2017
1 parent 0e14447 commit 6a6f71b
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,4 +230,37 @@ curl -XGET http://localhost:9200/medcl1/_analyze?text=%e5%88%98%e5%be%b7%e5%8d%8
</pre>


7.That's all, have fun.
7.Used in phrase query
<pre>
PUT /medcl/
{
"index" : {
"analysis" : {
"analyzer" : {
"pinyin_analyzer" : {
"tokenizer" : "my_pinyin"
}
},
"tokenizer" : {
"my_pinyin" : {
"type" : "pinyin",
"keep_first_letter":false,
"keep_separate_first_letter" : false,
"keep_full_pinyin" : true,
"keep_original" : false,
"limit_first_letter_length" : 16,
"lowercase" : true
}
}
}
}
}
GET /medcl/folks/_search
{
"query": {"match_phrase": {
"name.pinyin": "刘德华"
}}
}
</pre>

8.That's all, have fun.

0 comments on commit 6a6f71b

Please sign in to comment.