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
package com.jd.train.common; | |
import java.lang.reflect.Method; | |
import java.util.ArrayList; | |
/** | |
* Created by yanglikun on 2017/6/8. | |
*/ | |
class A { | |
public void publicA() { |
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
GET _search | |
{ | |
"query": { | |
"match_all": {} | |
} | |
} | |
GET /train/order/_search | |
GET /train/order/3 |
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
DELETE /test_index | |
GET /test_index/person/_search | |
PUT /test_index/person/1 | |
{ | |
"name":"zhangsan", | |
"desc":"My name is zhangsan.I live in beijing." |
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
DELETE /test_index | |
PUT /test_index | |
PUT /test_index/_mapping/book | |
{ | |
"person": { | |
"properties": { | |
"name": { | |
"type": "string", | |
"store": "yes" |
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
DELETE /test_index | |
PUT /test_index/person/1 | |
{ | |
"name":"zhangsan", | |
"desc":"My name is zhangsan.I live in beijing." | |
} | |
GET /test_index/person/_search | |
GET /test_index/person/_search?version=true |
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
DELETE /test_index | |
GET /test_index/person/_search | |
GET /test_index/person/_search?version | |
PUT /test_index/person/1 | |
{ | |
"name":"zhangsan", | |
"desc":"My name is zhangsan.I live in beijing." | |
} |
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
GET _search | |
{ | |
"query": { | |
"match_all": {} | |
} | |
} | |
DELETE /test_index |
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
##search scope | |
GET /_mapping | |
#cluster | |
GET /_search | |
#specific index | |
GET /get-together/_search | |
#specific index and type | |
GET /get-together/event/_search | |
#specific type | |
GET /_all/event/_search |
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
#match | |
GET /get-together/event/_search | |
{ | |
"query": { | |
"match": { | |
"title": "hadoop" | |
} | |
} | |
} | |
#filtered query |
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
POST /analyzer_index | |
{ | |
"settings": { | |
"index": { | |
"analysis": { | |
"analyzer":{ | |
"myCustomAnalyzer":{ | |
"type":"custom", | |
"tokenizer":"myCustomTokenizer", | |
"filter":["myCustomFilter1","myCustomFilter2"], |
OlderNewer