1
저는 Elasticsearch에서 새로 왔으며 하위 문자열에 대한 고유 한 검색어 작성 방법을 배우고 싶습니다. 우리는 SQL에서와 마찬가지로 :Elasticsearch에서 정규 표현식을 사용하는 집계
SELECT distinct substring(abc,3,5)
FROM table_a
나는이 쿼리를 가지고 있고, 나는 메시지의 substring(message,35,10)
부분에 서로 다른 선택을 할 : 나는 같은 것을 추가 할 생각
{
"query" :
{ "range":{
"@timestamp" : {
"gte" : "now-6d/d",
"lt" : "now-5d/d"
}
}},
"_source":["@timestamp","message"],
"size":100,
"from":0
}
:
"aggs": {
"distinct": {
"terms": {
"field": "message",--should have something like substring
"size": 0
}
}
}
도움 주셔서 감사합니다.