当前位置:网站首页>Efficient exploration | an application practice of ES geographical location query
Efficient exploration | an application practice of ES geographical location query
2022-06-25 07:04:00 【The stars are falling】
Recently participated in a development requirements review , To realize a function of querying data according to longitude, latitude and distance .
At first, I heard that it was necessary to do this , There's no clue .
Just when I want to implement the method , An architecture boss confidently said that it can be achieved through the high moral map , However, the range of the query is not a circle , It's a rectangle .emmm... The product gritted its teeth and agreed .
After the requirements review , Manage the background and web According to this direction , Floating in the sea of the Internet , Finally, find an implementation method . Copy 、 debugging 、 Release , After a fierce operation , The function is tested .
No accident , When it comes to testing , porous . Later, I found , When a person's latitude and longitude , Locate other cities , Then query the data of a certain distance range , Difference between 50-100 km , The result page actually has data .
Can't , Can only be re implemented ...
Later, a colleague said es It has the function of querying according to longitude and latitude , I'll look for it on the Internet api, It turned out that . After deployment with the O & M colleagues again and again 、 After joint commissioning , Function realized . The following is the process of configuration :
1.es edition :
2. Database version :

3. Database configuration sql:

4. Key conversion configurations :

5. Data output to es:

6. Mapping template configuration :

7.kibnan Inquire about :

thus , Function realization , A transmitted longitude and latitude is a dot ,200KM All the data within will be found out
notes : longitude: longitude coordinate: dimension
边栏推荐
- In a single-page app, what is the right way to deal with wrong URLs (404 errors)?
- In depth inventory: 23 vscode plug-in artifacts that improve development efficiency and aesthetics
- Unity get resource path
- How to find happiness in programming and get lasting motivation?
- Blue Bridge Cup SCM module code (timer) (code + comments)
- Direct select sort and quick sort
- Americo technology launches professional desktop video editing solution
- [2022 dark horse programmer] SQL optimization
- 使用OpenGL绘制shp文件
- 'how do I create an enumeration with constant values in rust?'- How can I create enums with constant values in Rust?
猜你喜欢

Cs5092 5V USB input boost two section lithium battery charging management IC, SOT23-6 miniature package

Derivation of sin (a+b) =sina*cosb+sinb*cosa

Drosophila played VR and entered nature. It was found that there were attention mechanisms and working memory. The insect brain was no worse than that of mammals

活动报名|Apache Pulsar x KubeSphere 在线 Meetup 火热来袭

Derivation of COS (a+b) =cosa*cosb-sina*sinb

Can TCP syn handshake messages transmit data

DataX tutorial (09) - how does dataX achieve speed limit?
![[2022 dark horse programmer] SQL optimization](/img/68/92ee1ff47428e17aca0feb0e33382e.png)
[2022 dark horse programmer] SQL optimization

Derivation of COS (a-b) =cosa*cosb+sina*sinb
![[200 opencv routines of youcans] 104 Motion blur degradation model](/img/a9/8841ffc8bd3c486bc4011a1a84ff45.jpg)
[200 opencv routines of youcans] 104 Motion blur degradation model
随机推荐
[ros2] Why use ros2? Introduction to ros2 system characteristics
Analysis on the output, market scale and development status of China's children's furniture industry in 2020 and the competition pattern of children's furniture enterprises [figure]
Which securities company do you want to buy stocks to open an account faster and safer
了解zbrush雕刻软件,以及游戏建模的分析
Ctfhub web - divulgation d'informations - traversée du Répertoire
燕京啤酒何以至此?
In depth inventory: 23 vscode plug-in artifacts that improve development efficiency and aesthetics
Keil debug view variable prompt not in scope
Acwing2013. three lines
Ht8513 single lithium battery power supply with built-in Dynamic Synchronous Boost 5W mono audio power amplifier IC solution
Make fertilizer Safi from crop residues locally to increase yield by 30% and improve soil
Cs5092 5V USB input boost two section lithium battery charging management IC, SOT23-6 miniature package
Your local changes to the following files would be overwritten by merge: .vs/slnx.sqlite
STL map的用法
cos(a+b)=cosa*cosb-sina*sinb的推导过程
Message queue table structure for storing message data
这些老系统代码,是猪写的么?
sin(a+b)=sina*cosb+sinb*cosa的推导过程
【2022黑马程序员】SQL优化
Analysis of common interview questions in redis