什么是ElasticSearch?

一个开源的分布式搜索引擎,可以用来实现搜索、日志统计、分析

系统监控等功能。底层是基于Lucene开发。

什么是Lucene?

Lucene是一个ava语言的搜索引擎类库,是Apache的开源搜索引擎类库,提供了搜索引擎的核心API。

docker 中安装 elasticsearch 和 kibana

注意版本需要一致。可以前往 [https://hub.docker.com/](https://hub.docker.com/) 查看

  • 拉取镜像之前创建一个网络。可以让多个Docker容器在同一个虚拟网络中通信,从而使它们能够相互访问。

docker network create es-net

安装启动 elasticsearch

我尝试了好几个高的版本,比如:==8.10.1==(没有ik对应的分词器)、==8.9.0==(maven坐标搞不定)...最终还是选择了==7.12.1==【用了我一周时间...】

# 拉取镜像

docker pull elasticsearch:7.12.1

# 启动容器

docker run -d --name es -e "ES_JAVA_OPTS=-Xms512m -Xmx512m" -e "discovery.type=single-node" -v es-data:/usr/share/es/data -v es-plugins:/usr/share/es/plugins --privileged --network es-net -p 9200:9200 -p 9300:9300 elasticsearch:7.12.1
  • -e “cluster.name=es-docker-cluster”:设置集群名称

  • -e “http.host=0.0.0.0”:监听的地址,可以外网访问

  • -e “ES_JAVA_OPTS=-Xms512m -Xmx512m”:内存大小

  • -e “discovery.type=single-node”:非集群模式

  • -v es-data:/usr/share/elasticsearch/data:挂载逻辑卷,绑定es的数据目录

  • -v es-logs:/usr/share/elasticsearch/logs:挂载逻辑卷,绑定es的日志目录

  • -v es-plugins:/usr/share/elasticsearch/plugins:挂载逻辑卷,绑定es的插件目录

  • -privileged:授予逻辑卷访问权

  • -network es-net :加入一个名为es-net的网络中

  • -p 9200:9200:端口映射配置

浏览器输入:http://ip:9200 访问,记得开放端口哦,

注意: 如果访问出现弹框需要输入账户密码。

推荐解决方式:

  • docker exec -u 0 -it es /bin/bash 以管理员身份进入es中

  • vi config/elasticsearch.yml 编辑,添加 xpack.security.enabled: false 关闭账户密码访问的意思。再重启访问(30-60秒的样子)

  • 提示 bash: vi: command not found 。先运行 apt-get update 、再运行 apt-get install -y vim 安装vi。再去执行上面命令

方式二:(后续kibana连接没有找到有效的解决方式)

  • docker exec -it es /bin/bash 输入命令进入es中

  • elasticsearch-reset-password -u elastic -i 输入 y ,然后输入你自己的密码,注意输入密码不回写

安装启动 kibana

# 拉取镜像

docker pull kibana:7.12.1

# 启动容器

docker run -d --name kibana -e ELASTICSEARCH_HOSTS=http://es:9200 --network=es-net -p 5601:5601 kibana:7.12.1

浏览器输入:http://ip:5601 即可访问

安装 IK 分词器

在线安装(慢)

# 进入容器内部

docker exec -it es /bin/bash

# 在线下载并安装

./bin/elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v7.12.1/elasticsearch-analysis-ik-7.12.1.zip

#退出

exit

#重启容器

docker restart es

离线安装(这个我不知道为啥不成功,还是记录下吧)

[https://github.com/medcl/elasticsearch-analysis-ik](https://github.com/medcl/elasticsearch-analysis-ik) ik分词器资源,我下载的是7.12.1(眼睛都找花)

1. 查看elasticsearch的数据卷目录

docker volume inspect es-plugins

显示结果:

[
    {
        "CreatedAt": "2023-09-22T14:00:43+08:00",
        "Driver": "local",
        "Labels": null,
        "Mountpoint": "/var/lib/docker/volumes/es-plugins/_data",
        "Name": "es-plugins",
        "Options": null,
        "Scope": "local"
    }
]

说明plugins目录被挂载到了:`/var/lib/docker/volumes/es-plugins/_data `这个目录中。

2. 解压并重命名为 ik 后放到==es-plugins/_data==目录下

3. 重启容器

种类

  • ik_smart:粗粒分词,分出的词相对较少,但占用内存空间也较少

  • ik_max_word:最细切分,分出的词相对更细,但占用内存空间也更多

正向索引和倒排索引

什么是文档和词条?

  • 每一条数据就是一个文档

  • 对文档中的内容分词,得到的词语就是词条

什么是正向索引?

  • 基于文档id创建索引。查询词条时必须先找到文档,而后判断是否包含词条

什么是倒排索引?

  • 对文档内容分词,对词条创建索引,并记录词条所在文档的信息。

  • 查询时先根据词条查询到文档id,而后获取到文档

mapping属性

mapping常见属性有哪些?

  • type:数据类型

  • index: 是否索引

  • analyzer:分词器

  • properties:子字段

type常见的有哪些?

  • 字符串: text、**keyword**

  • 数字: long、**integer**、**short**、**byte**、**double**、**float**

  • 布尔: boolean

  • 日期: date

  • 对象: object

语法

索引操作

可以理解成;索引就是mysql的一张表,文档就是mysql 的一条数据

创建索引库

PUT /xy
{
  "mappings": {
    "properties": {
      "info":{
        "type": "text",
        "analyzer": "ik_smart"
      },
      "email":{
        "type": "keyword",
        "index": false
      },
      "name":{
        "type": "object",
        "properties": {
          "firstName":{
             "type":"keyword"
          },
          "lastName":{
            "type":"keyword"
          }
        }
      }
    }
  }
}

查看索引

GET /xy

删除索引

DELETE /xy

修改索引库

只能新增,不能修改

PUT /xy/_mapping
{
  "properties":{
    "age":{
      "type":"integer"
    }
  }
}

文档操作

新增文档

POST /xy/_doc/2
{
  "info":"这是一个标题",
  "email":"123@qq.com",
  "name":{
    "firstName":"云",
    "lastName":"赵"
  }
}

查看文档

GET /xy/_doc/2

删除文档

DELETE /xy/_doc/1

修改文档

1. 全量修改

PUT /xy/_doc/2
{
  "info":"这是一个标题",
  "email":"1234@qq.com",
  "name":{
    "firstName":"云",
    "lastName":"赵"
  }
}

2. 增量修改

POST /xy/_update/2
{
  "doc":{
    "info":"这是一个标题",
  "email":"1234567@qq.com"
  }
}

RestClient 操作索引库

1. 新增数据库、导入数据

DROP TABLE IF EXISTS `tb_hotel`;
CREATE TABLE `tb_hotel`  (
  `id` bigint(20) NOT NULL COMMENT '酒店id',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '酒店名称',
  `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '酒店地址',
  `price` int(10) NOT NULL COMMENT '酒店价格',
  `score` int(2) NOT NULL COMMENT '酒店评分',
  `brand` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '酒店品牌',
  `city` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '所在城市',
  `star_name` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '酒店星级,1星到5星,1钻到5钻',
  `business` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '商圈',
  `latitude` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '纬度',
  `longitude` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '经度',
  `pic` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '酒店图片',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Compact;

INSERT INTO `tb_hotel` VALUES (36934, '7天连锁酒店(上海宝山路地铁站店)', '静安交通路40号', 336, 37, '7天酒店', '上海', '二钻', '四川北路商业区', '31.251433', '121.47522', 'https://m.tuniucdn.com/fb2/t1/G1/M00/3E/40/Cii9EVkyLrKIXo1vAAHgrxo_pUcAALcKQLD688AAeDH564_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (38609, '速8酒店(上海赤峰路店)', '广灵二路126号', 249, 35, '速8', '上海', '二钻', '四川北路商业区', '31.282444', '121.479385', 'https://m.tuniucdn.com/fb2/t1/G2/M00/DF/96/Cii-TFkx0ImIQZeiAAITil0LM7cAALCYwKXHQ4AAhOi377_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (38665, '速8酒店上海中山北路兰田路店', '兰田路38号', 226, 35, '速8', '上海', '二钻', '长风公园地区', '31.244288', '121.422419', 'https://m.tuniucdn.com/fb2/t1/G2/M00/EF/86/Cii-Tlk2mV2IMZ-_AAEucgG3dx4AALaawEjiycAAS6K083_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (38812, '7天连锁酒店(上海漕溪路地铁站店)', '徐汇龙华西路315弄58号', 298, 37, '7天酒店', '上海', '二钻', '八万人体育场地区', '31.174377', '121.442875', 'https://m.tuniucdn.com/fb2/t1/G2/M00/E0/0E/Cii-TlkyIr2IEWNoAAHQYv7i5CkAALD-QP2iJwAAdB6245_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (39106, '7天连锁酒店(上海莘庄地铁站店)', '闵行莘庄镇七莘路299号', 348, 41, '7天酒店', '上海', '二钻', '莘庄工业区', '31.113812', '121.375869', 'https://m.tuniucdn.com/fb2/t1/G2/M00/D8/11/Cii-T1ku2zGIGR7uAAF1NYY9clwAAKxZAHO8HgAAXVN368_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (39141, '7天连锁酒店(上海五角场复旦同济大学店)', '杨浦国权路315号', 349, 38, '7天酒店', '上海', '二钻', '江湾、五角场商业区', '31.290057', '121.508804', 'https://m.tuniucdn.com/fb2/t1/G2/M00/C7/E3/Cii-T1knFXCIJzNYAAFB8-uFNAEAAKYkQPcw1IAAUIL012_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (45845, '上海西藏大厦万怡酒店', '虹桥路100号', 589, 45, '万怡', '上海', '四钻', '徐家汇地区', '31.192714', '121.434717', 'https://m.tuniucdn.com/fb3/s1/2n9c/48GNb9GZpJDCejVAcQHYWwYyU8T_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (45870, '上海临港豪生大酒店', '新元南路555号', 896, 45, '豪生', '上海', '四星级', '滴水湖临港地区', '30.871729', '121.81959', 'https://m.tuniucdn.com/fb3/s1/2n9c/2F5HoQvBgypoDUE46752ppnQaTqs_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (46829, '上海浦西万怡酒店', '恒丰路338号', 726, 46, '万怡', '上海', '四钻', '上海火车站地区', '31.242977', '121.455864', 'https://m.tuniucdn.com/fb3/s1/2n9c/x87VCoyaR8cTuYFZmKHe8VC6Wk1_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (47066, '上海浦东东站华美达酒店', '施新路958号', 408, 46, '华美达', '上海', '四钻', '浦东机场核心区', '31.147989', '121.759199', 'https://m.tuniucdn.com/fb3/s1/2n9c/2pNujAVaQbXACzkHp8bQMm6zqwhp_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (47478, '速8酒店(上海松江中心店)', '松江荣乐东路677号', 428, 35, '速8', '上海', '二钻', '佘山、松江大学城', '31.016712', '121.261606', 'https://m.tuniucdn.com/filebroker/cdn/res/07/36/073662e1718fccefb7130a9da44ddf5c_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (56201, '上海齐鲁万怡大酒店', '东方路838号', 873, 44, '万怡', '上海', '四星级', '浦东陆家嘴金融贸易区', '31.226031', '121.525801', 'https://m.tuniucdn.com/fb2/t1/G6/M00/52/B6/Cii-TF3eXKeIJeN7AASiKHbTtx4AAGRegDSBzMABKJA111_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (56214, '上海浦东华美达大酒店', '新金桥路18号', 830, 45, '华美达', '上海', '四星级', '浦东金桥地区', '31.244916', '121.590752', 'https://m.tuniucdn.com/fb3/s1/2n9c/3jtXiuMKZEXJAuKuAkc47yLCjUBt_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (56227, '上海圣淘沙万怡酒店', '南桥镇南桥路1号', 899, 45, '万怡', '上海', '四星级', '奉贤开发区', '30.910917', '121.456525', 'https://m.tuniucdn.com/fb2/t1/G6/M00/52/B9/Cii-U13eXSiIdJjXAARSA6FywFYAAGRnwHvy1AABFIb158_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (56392, '上海银星皇冠假日酒店', '番禺路400号', 809, 47, '皇冠假日', '上海', '五星级', '徐家汇地区', '31.202768', '121.429524', 'https://m.tuniucdn.com/fb3/s1/2n9c/37ucQ38K3UFdcRqntJ8M5dt884HR_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (56852, '上海财大豪生大酒店', '武东路188号', 592, 46, '豪生', '上海', '五钻', '江湾/五角场商业区', '31.304182', '121.492936', 'https://m.tuniucdn.com/fb3/s1/2n9c/2jGHezLZvPZqC9cBGesbP5vAhCXi_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (56912, '上海华凯华美达广场酒店', '月华路9号', 747, 40, '华美达', '上海', '四钻', '奉贤开发区', '30.814382', '121.464521', 'https://m.tuniucdn.com/fb3/s1/2n9c/45iaCNCuZavJTxwTLskhVKzwynLD_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (56977, '上海五角场华美达大酒店', '黄兴路1888号', 499, 40, '华美达', '上海', '三钻', '江湾/五角场商业区', '31.292932', '121.519759', 'https://m.tuniucdn.com/fb3/s1/2n9c/26VREqAQdaGFvJdAJALVtjxcNMpL_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (60214, '上海金茂君悦大酒店', '世纪大道88号(54楼办理入住)', 699, 46, '君悦', '上海', '五星级', '浦东陆家嘴金融贸易区', '31.235152', '121.506082', 'https://m.tuniucdn.com/fb3/s1/2n9c/7Azm3jvGUHuXe3eS1DrixAWVTXY_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (60223, '上海希尔顿酒店', '静安华山路250号', 2688, 37, '希尔顿', '上海', '五星级', '静安寺地区', '31.219306', '121.445427', 'https://m.tuniucdn.com/filebroker/cdn/res/92/10/9210e74442aceceaf6e196d61fc3b6b1_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (60359, '上海外高桥皇冠假日酒店', '杨高北路1000号', 3299, 46, '皇冠假日', '上海', '五星级', '浦东外高桥地区', '31.338944', '121.590611', 'https://m.tuniucdn.com/fb3/s1/2n9c/VcKUM9zUSiVgDhFioc6mWQoX9ES_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (60363, '上海新世界丽笙大酒店', '南京西路88号', 1341, 46, '丽笙', '上海', '五星级', '人民广场地区', '31.23462', '121.47327', 'https://m.tuniucdn.com/fb3/s1/2n9c/2j31b7X3YzGkf4Li3phS6TG1mtwm_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (60398, '上海复旦皇冠假日酒店', '邯郸路199号', 924, 47, '皇冠假日', '上海', '五星级', '江湾/五角场商业区', '31.295382', '121.502537', 'https://m.tuniucdn.com/fb3/s1/2n9c/2H1Gk8LHaBWZfYvR6NYYcGTvACmL_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (60487, '上海外滩茂悦大酒店', '黄浦路199号', 689, 44, '君悦', '上海', '五星级', '外滩地区', '31.245409', '121.492969', 'https://m.tuniucdn.com/fb3/s1/2n9c/2Swp2h1fdj9zCUKsk63BQvVgKLTo_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (60522, '上海嘉豪淮海国际豪生酒店', '汾阳路1号', 425, 45, '豪生', '上海', '四钻', '淮海路/新天地地区', '31.215497', '121.456297', 'https://m.tuniucdn.com/fb3/s1/2n9c/38UBi4QYuaF8jN94CxQ7tb7tjtmZ_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (60916, '上海绿地万怡酒店', '沪宜公路3101号', 328, 45, '万怡', '上海', '四钻', '嘉定新城', '31.368523', '121.258567', 'https://m.tuniucdn.com/fb3/s1/2n9c/3VLwG9tTQQnp3M3MTeMTdx9nas9B_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (60922, '上海虹桥祥源希尔顿酒店', '红松东路1116号', 1108, 45, '希尔顿', '上海', '五钻', '虹桥地区', '31.18746', '121.395312', 'https://m.tuniucdn.com/fb3/s1/2n9c/tQRqDTFkHnHzMZiDKjcGV81ekvc_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (60935, '上海虹口三至喜来登酒店', '四平路59号', 1899, 46, '喜来登', '上海', '五星级', '四川北路商业区', '31.2579', '121.487954', 'https://m.tuniucdn.com/fb3/s1/2n9c/3C3gxLxLjVwnkxJwJm8rd3f38kcd_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (61075, '上海雅居乐万豪酒店', '西藏中路555号', 1152, 46, '万豪', '上海', '五钻', '人民广场地区', '31.236681', '121.473529', 'https://m.tuniucdn.com/fb3/s1/2n9c/3FoT16PkXavKsssvktVvVq5Si6Cr_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (61083, '上海滴水湖皇冠假日酒店', '自由贸易试验区临港新片区南岛1号', 971, 44, '皇冠假日', '上海', '五钻', '滴水湖临港地区', '30.890867', '121.937241', 'https://m.tuniucdn.com/fb3/s1/2n9c/312e971Rnj9qFyR3pPv4bTtpj1hX_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (309208, '北京王府井希尔顿酒店', '王府井东街8号', 1679, 46, '希尔顿', '北京', '五钻', '天安门/王府井地区', '39.914539', '116.413392', 'https://m.tuniucdn.com/fb2/t1/G6/M00/52/10/Cii-TF3ePt2IX9UEAALb6VYBSmoAAGKMgGsuW8AAtwB147_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (394559, '北京东方君悦大酒店', '长安街1号东方广场', 686, 45, '君悦', '北京', '五星级', '天安门/王府井地区', '39.909635', '116.414621', 'https://m.tuniucdn.com/fb3/s1/2n9c/3mFqcNSh7eEo9yc3Rw2P5HDNTdDe_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (394617, '北京宝辰饭店', '建国门内大街甲18号', 418, 44, '豪生', '北京', '四星级', '北京站/建国门地区', '39.905768', '116.428153', 'https://m.tuniucdn.com/fb3/s1/2n9c/NEYa6EfDHuhhb19Ct85WBbkKHZU_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (394796, '北京新云南皇冠假日酒店', '东北三环西坝河太阳宫桥东北角云南大厦', 485, 46, '皇冠假日', '北京', '五星级', '国展中心地区', '39.972409', '116.434698', 'https://m.tuniucdn.com/fb3/s1/2n9c/dfP8K782eTsohQWSRdkd7St9LA2_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (395434, '北京希尔顿酒店', '东三环北路东方路1号', 350, 45, '希尔顿', '北京', '五星级', '燕莎/朝阳公园商业区', '39.952703', '116.462387', 'https://m.tuniucdn.com/fb3/s1/2n9c/3fwNbKGhk6XCrkdVyxwhC5uGpLVy_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (395702, '北京首都机场希尔顿酒店', '首都机场3号航站楼三经路1号', 222, 46, '希尔顿', '北京', '五钻', '首都机场/新国展地区', '40.048969', '116.619566', 'https://m.tuniucdn.com/fb2/t1/G6/M00/52/10/Cii-U13ePtuIMRSjAAFZ58NGQrMAAGKMgADZ1QAAVn_167_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (395787, '北京海航大厦万豪酒店', '霄云路甲26号', 1302, 46, '万豪', '北京', '五钻', '燕莎/朝阳公园商业区', '39.959861', '116.467363', 'https://m.tuniucdn.com/fb3/s1/2n9c/3zFiWi2C9SmbcQwCZgJFQC9ahvs5_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (395799, '北京国际艺苑皇冠假日酒店', '王府井大街48号', 636, 44, '皇冠假日', '北京', '五星级', '天安门/王府井地区', '39.918994', '116.411277', 'https://m.tuniucdn.com/fb2/t1/G6/M00/52/10/Cii-U13ePvyIahjPAAMykV278aEAAGKOQO9e4UAAzKp283_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (395815, '北京明豪华美达酒店', '天竺镇府前一街13号', 558, 46, '华美达', '北京', '四钻', '首都机场/新国展地区', '40.062832', '116.580678', 'https://m.tuniucdn.com/fb2/t1/G6/M00/52/13/Cii-U13eP2mIKCwvAAODTZXT-fAAAGKVAA9taIAA4Nl245_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (396189, '北京朝阳悠唐皇冠假日酒店', '三丰北里3号', 944, 46, '皇冠假日', '北京', '五钻', '三里屯/工体/东直门地区', '39.92129', '116.43847', 'https://m.tuniucdn.com/fb3/s1/2n9c/tT6ipLain1ZovR5gnQ7tJ4KKym5_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (396471, '维也纳酒店(北京花园路店)', '海淀北太平庄花园路甲17号', 381, 36, '维也纳', '北京', '三钻', '马甸、安贞地区', '39.970837', '116.365244', 'https://m.tuniucdn.com/filebroker/cdn/res/17/00/1700926908bae6ba3e5ef96de7b7d4cc_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (396506, '北京金隅喜来登酒店', '北三环东路36号', 357, 47, '喜来登', '北京', '五星级', '马甸/安贞地区', '39.967163', '116.4099', 'https://m.tuniucdn.com/fb3/s1/2n9c/29FW2WtGzzUtPhWR1LKxcFZAVa9P_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (413460, '7天连锁酒店(北京天坛店)', '东城天坛东里甲48号', 753, 38, '7天酒店', '北京', '二钻', '前门、崇文门商贸区', '39.875786', '116.421987', 'https://m.tuniucdn.com/fb2/t1/G2/M00/C7/D8/Cii-T1knCK6IWTtxAAI0plLButMAAKYTAJu-woAAjS-422_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (413476, '7天连锁酒店(北京南站店)', '丰台马家堡西路22号', 478, 37, '7天酒店', '北京', '二钻', '永定门、南站、大红门、南苑地区', '39.845363', '116.372327', 'https://m.tuniucdn.com/fb2/t1/G1/M00/26/B7/Cii-U1knCtaISM4VAAHkEQd-mrAAAKw0ALVCwEAAeQp741_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (414168, '7天连锁酒店(北京西直门店)', '西城平安里西大街翠花街育幼胡同甲20-22号', 419, 37, '7天酒店', '北京', '二钻', '西单、金融街地区', '39.931338', '116.364982', 'https://m2.tuniucdn.com/filebroker/cdn/res/bc/66/bc666859edf4fc072a8006c66758058d_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (414481, '7天连锁酒店(北京团结湖地铁站店)', '朝阳团结湖北里9号楼', 525, 36, '7天酒店', '北京', '二钻', '燕莎、三里屯商业区', '39.928457', '116.466132', 'https://m.tuniucdn.com/fb2/t1/G1/M00/38/2D/Cii9EFkv2-uIPTaBAALX6P-rbdUAALPpwHv4ykAAtgA277_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (414698, '7天连锁酒店(北京798艺术区店)', '朝阳北京市朝阳区酒仙桥北路(798艺术区北门)彩虹路6号-电通创意广场大院内', 553, 37, '7天酒店', '北京', '二钻', '望京、酒仙桥、798地区', '39.990671', '116.498452', 'https://m.tuniucdn.com/fb2/t1/G2/M00/D8/11/Cii-T1ku2zqIN7SiAAEdvT6RrjUAAKxZQKFooYAAR3V090_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (415600, '如家酒店(北京朝阳北路传媒大学褡裢坡地铁站店)', '三间房乡褡裢坡村青年沟西侧558号', 259, 47, '如家', '北京', '二钻', '传媒大学/管庄地区', '39.923212', '116.560023', 'https://m.tuniucdn.com/fb3/s1/2n9c/3NezpxNZWQMdNXibwbMkQuAZjDyJ_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (415659, '7天连锁酒店(北京紫竹桥店)', '海淀北洼路甲3号', 781, 42, '7天酒店', '北京', '二钻', '西直门及北京展览馆地区', '39.936138', '116.302405', 'https://m.tuniucdn.com/fb2/t1/G1/M00/3C/22/Cii9EVkxPMqIZJz-AAIh0esETAIAALXbgNQkH8AAiHp053_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (416121, '如家酒店(北京西客站北广场店)', '莲花池东路120-2号6层', 275, 43, '如家', '北京', '二钻', '北京西站/丽泽商务区', '39.896449', '116.317382', 'https://m.tuniucdn.com/fb3/s1/2n9c/42DTRnKbiYoiGFVzrV9ZJUxNbvRo_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (416260, '7天连锁酒店(北京通州八里桥店)', '永顺镇西马庄小区', 534, 38, '7天酒店', '北京', '二钻', '果园环岛、通州区', '39.915443', '116.631871', 'https://m.tuniucdn.com/fb2/t1/G2/M00/DF/5A/Cii-TlkxkeGIKM0oAAGOb64RvToAALBAAH9Fg8AAY6H201_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (416268, '和颐酒店(北京传媒大学财满街店)', '朝阳路高井176号', 524, 46, '和颐', '北京', '三钻', '国贸地区', '39.918277', '116.53015', 'https://m.tuniucdn.com/fb2/t1/G6/M00/52/13/Cii-TF3eP5GIJIOLAAUwsIVCxdAAAGKXgK5a0IABTDI239_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (416307, '速8酒店(北京新国展首都机场后沙峪店)', '后沙峪镇裕民大街32号', 350, 39, '速8', '北京', '二钻', '首都机场/新国展地区', '40.099019', '116.543655', 'https://m.tuniucdn.com/fb2/t1/G6/M00/52/3E/Cii-TF3eRgGIHCkKAAP_ATvriiQAAGL0AIoLtUAA_8Z513_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (432335, '7天连锁酒店(上海北外滩国际客运中心地铁站店)', '唐山路145号', 249, 35, '7天酒店', '上海', '二钻', '北外滩地区', '31.252585', '121.498753', 'https://m2.tuniucdn.com/filebroker/cdn/res/c1/ba/c1baf64418437c56617f89840c6411ef_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (433576, '如家酒店(上海南京路步行街店)', '南京东路480号保安坊内', 379, 44, '如家', '上海', '二钻', '人民广场地区', '31.236454', '121.480948', 'https://m.tuniucdn.com/fb2/t1/G6/M00/52/BA/Cii-U13eXVaIQmdaAAWxgzdXXxEAAGRrgNIOkoABbGb143_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (434082, '如家酒店·neo(上海外滩城隍庙小南门地铁站店)', '复兴东路260号', 392, 44, '如家', '上海', '二钻', '豫园地区', '31.220706', '121.498769', 'https://m.tuniucdn.com/fb2/t1/G6/M00/52/B6/Cii-U13eXLGIdHFzAAIG-5cEwDEAAGRfQNNIV0AAgcT627_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (441836, '如家酒店(北京国展三元桥店)', '西坝河东里36号', 458, 47, '如家', '北京', '二钻', '国展中心地区', '39.966238', '116.450142', 'https://m.tuniucdn.com/fb2/t1/G6/M00/52/39/Cii-TF3eRTGITp1UAAYIilRD7skAAGLngIuAnQABgii479_w200_h200_c1_t0.png');
INSERT INTO `tb_hotel` VALUES (485775, '如家酒店(上海闵行华东师范大学吴泾店)', '吴泾镇宝秀路977号', 161, 45, '如家', '上海', '二钻', '交大/闵行经济开发区', '31.047135', '121.46224', 'https://m.tuniucdn.com/fb3/s1/2n9c/V8pz15CkiMX5xYJRmbbp5zkKWJ8_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (489756, '7天连锁酒店(北京平谷店)', '文化北街4-16号', 544, 40, '7天酒店', '北京', '二钻', '平谷城区', '40.14308', '117.111554', 'https://m2.tuniucdn.com/filebroker/cdn/res/2e/b4/2eb4edb22ddb981307d8570beb1d746d_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (517915, '如家酒店·neo(深圳草埔地铁站店)', '布吉路1036号', 159, 44, '如家', '深圳', '二钻', '田贝/水贝珠宝城', '22.583191', '114.118499', 'https://m.tuniucdn.com/fb3/s1/2n9c/228vhBCQmFRFWQBYX1cgoFQb6x58_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (527938, '深圳好日子皇冠假日酒店', '福华一路28号', 590, 46, '皇冠假日', '深圳', '五星级', '会展中心/CBD', '22.537153', '114.053529', 'https://m.tuniucdn.com/fb3/s1/2n9c/b6Ztz5jn4MngK3Hzfxuu9JGsjrm_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (541619, '如家酒店(上海莘庄地铁站龙之梦商业广场店)', '莘庄镇莘浜路172号', 149, 44, '如家', '上海', '二钻', '莘庄工业区', '31.105797', '121.37755', 'https://m.tuniucdn.com/fb3/s1/2n9c/3mKs3jETvJDj3dDdkRB9UyLLvPna_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (542068, '上海茂业华美达广场酒店', '沪南路938号', 646, 40, '华美达', '上海', '三钻', '浦东新国际博览中心', '31.182761', '121.554106', 'https://m.tuniucdn.com/fb3/s1/2n9c/2139uDFUZ2VKxrathwSeeE4DwyFU_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (546869, '深圳彭年万丽酒店', '嘉宾路2002号(毗邻金光华购物广场)', 701, 46, '万丽', '深圳', '五钻', '罗湖口岸/火车站', '22.540989', '114.122665', 'https://m.tuniucdn.com/fb3/s1/2n9c/gwAbqEXFUpjUBmnxUfK89p3zBBT_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (581859, '维也纳酒店(北京丰益桥店)(原申晨酒店)', '丰台丰管路8号', 648, 45, '维也纳', '北京', '三钻', '北京西站、丽泽商务区', '39.857707', '116.312482', 'https://m2.tuniucdn.com/filebroker/cdn/res/97/43/97438481b9e79abad429e5c30d7f303f_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (584697, '7天连锁酒店(深圳华强赛格广场店)', '华强南路3024号赛格苑1栋', 362, 36, '7天酒店', '深圳', '二钻', '华强北商业区', '22.539831', '114.087899', 'https://m.tuniucdn.com/fb2/t1/G2/M00/D8/11/Cii-T1ku2zmIcP4sAAEw8iuLXFgAAKxZQH7HVYAATEK972_w200_h200_c1_t0.jpg');
INSERT INTO `tb_hotel` VALUES (593228, '7天连锁酒店(北京颐和园店)', '海淀厢红旗路功德寺桥北侧', 730, 38, '7天酒店', '北京', '二钻', '香山、八大处风景区', '40.003959', '116.256718', 'https://m2.tuniucdn