일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |
Tags
- Java
- 900gle
- springboot
- aggregation
- Elasticsearch
- matplotlib
- analyzer test
- query
- zip 파일 암호화
- zip 암호화
- licence delete curl
- aggs
- sort
- Mac
- MySQL
- API
- high level client
- token filter test
- plugin
- Test
- license delete
- TensorFlow
- 파이썬
- flask
- docker
- ELASTIC
- Kafka
- 차트
- License
- Python
Archives
- Today
- Total
개발잡부
[es8] geo-point 본문
반응형
mapping
PUT my-index-000001
{
"mappings": {
"properties": {
"location": {
"type": "geo_point"
}
}
}
}
indexing
PUT my-index-000001
{
"mappings": {
"properties": {
"location": {
"type": "geo_point"
}
}
}
}
PUT my-index-000001/_doc/1
{
"text": "Geopoint as an object using GeoJSON format",
"location": {
"type": "Point",
"coordinates": [-71.34, 41.12]
}
}
PUT my-index-000001/_doc/2
{
"text": "Geopoint as a WKT POINT primitive",
"location" : "POINT (-71.34 41.12)"
}
PUT my-index-000001/_doc/3
{
"text": "Geopoint as an object with 'lat' and 'lon' keys",
"location": {
"lat": 41.12,
"lon": -71.34
}
}
PUT my-index-000001/_doc/4
{
"text": "Geopoint as an array",
"location": [ -71.34, 41.12 ]
}
PUT my-index-000001/_doc/5
{
"text": "Geopoint as a string",
"location": "41.12,-71.34"
}
PUT my-index-000001/_doc/6
{
"text": "Geopoint as a geohash",
"location": "drm3btev3e86"
}
searhc query
geo_bounding_box
GET my-index-000001/_search
{
"query": {
"geo_bounding_box": {
"location": {
"top_left": {
"lat": 42,
"lon": -72
},
"bottom_right": {
"lat": 40,
"lon": -74
}
}
}
}
}
geo_distance
GET /my_locations/_search
{
"query": {
"bool": {
"must": {
"match_all": {}
},
"filter": {
"geo_distance": {
"distance": "200km",
"pin.location": {
"lat": 40,
"lon": -70
}
}
}
}
}
}
반응형
'ElasticStack8 > Elasticsearch' 카테고리의 다른 글
[es8] Elasticsearch License (0) | 2022.10.03 |
---|---|
[es8] Elasticsearch Timestamp Pipeline (0) | 2022.10.02 |
[es8] korean analyzer-doori (0) | 2022.09.25 |
[es8] elasticsearch8.4.1 rest plugin for 900gle (0) | 2022.09.24 |
[es8] Elasticsearch Plugin 8.4.1 (0) | 2022.09.24 |
Comments