목록DB (87)
른록노트
searchAfter란많은 데이터들을 한번에 출력할 경우 문제가 발생할 수 있어서,쿼리를 검색한 후 sort값을 기준으로 searchAfter 값 이후의 데이터들이 나오게 한다. GET twitter/tweet/_search { "size": 10, "query": { "match" : { "title" : "elasticsearch" } }, "search_after": [1463538857, "654323"], "sort": [ {"date": "asc"}, {"_id": "desc"} ] } 참고사이트https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-search-after.html
[index]/_settings{ "index" : { "max_result_window" : 500000 } } 참고사이트https://stackoverflow.com/questions/35206409/elasticsearch-2-1-result-window-is-too-large-index-max-result-window
TomDec 16, 2014 at 5:48 pmHi, is there a way to get just the count of buckets (not the count of docs, which works i know) of an aggregation without receiving the whole buckets content? thx, Tom - Show quoted text - (질문한 양반 해석)어그리게이션의 버킷의 개수만 구하는 방법이 있나요?(내가 알고있는 docs의 개수 말고 전체 내용 없이) (해결법) Rich Somerfieldat Dec 16, 2014 at 7:02 pm⇧Hi Tom, I think the "Cardinality" aggregation is what you want. e..
참고사이트https://www.elastic.co/guide/en/elasticsearch/reference/2.3/search-uri-request.html
Search APIseditMost search APIs are multi-index, multi-type, with the exception of the Explain API endpoints.RoutingeditWhen executing a search, it will be broadcast to all the index/indices shards (round robin between replicas). Which shards will be searched on can be controlled by providing the routing parameter. For example, when indexing tweets, the routing value can be the user name:POST /t..
Combining FilterseditThe previous two examples showed a single filter in use. In practice, you will probably need to filter on multiple values or fields. For example, how would you express this SQL in Elasticsearch?SELECT product FROM products WHERE (price = 20 OR productID = "XHDK-A-1293-#fJ3") AND (price != 30)In these situations, you will need to use a bool query inside the constant_score que..
POST test/type1/1/_update{ "script" : "ctx._source.new_field = 'value_of_new_field'"} 참고사이트https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update.html
CAST함수는 형변환 함수이다. 형변환 함수(Cast Functions) MySQL 4.0.2부터 추가된 함수로 CAST()와 CONVERT() 함수는 한 타입의 값을 취해서 다른 타입의 값으로 사용된다. 구문은 아래와 같다. CAST(expression AS type) 참고사이트http://database.sarang.net/?inc=read&aid=19889&criteria=mysql&subcrit=&id=&limit=20&keyword=&page=2