Elasticsearch 관련 레퍼런스
2017. 12. 29. 13:27ㆍ서버 프로그래밍
range filter와 match 조건을 함께 쿼리하는 방법
GET index12345678/_search
{
"query": {
"bool": {
"should": [
{
"match": {
"type" : 1234
}
}
],
"minimum_number_should_match": 1,
"filter": {
"range" : {
"created_at" : {"gte":1514386800000}
}
}
}
}
}
GET _search
{
"query": {
"bool": {
"should": [
{
"match": {
"text": "facebook advice"
}
},
{
"match": {
"profile": "facebook advice"
}
}
],
"minimum_number_should_match": 1,
"filter": {
"term": {
"accountid": "22"
}
}
}
}
}
Range Query
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-range-query.html
Count API
https://www.elastic.co/guide/en/elasticsearch/reference/current/search-count.html
ElasticSearch query 예제
http://i5on9i.blogspot.kr/2015/03/elasticsearch-query.html
Elasticsearch search type
http://jinuland.blogspot.kr/2015/10/elasticsearch-search-type.html