链接:https://pan.baidu.com/s/1Pk8FixNdgUySYUHwvP-qiA?pwd=7iwg
提取码:7iwg
Elasticsearch简称 es(一下均用简称)
直接解压到你的某一个文件夹下-(注意不要有中文路径)
(查看配置文件发现,-端口号为9200) 可以不用修改用默认的,
(是一些程序里边的java的配置参数的一个集合,不同的应用都会定义自己的jvm.options用来控制一些jvm的参数 )
修改堆占用大小为 -Xms512m -Xmx512m
双击bin下的elasticsearch.bat 直接启动
warning: usage of JAVA_HOME is deprecated, use ES_JAVA_HOME"
Future versions of Elasticsearch will require Java 11; your Java version from [D:\javaTools\java\jdk1.8\jdk1.8.0_311\jre] does not meet this requirement. Consider switching to a distribution of Elasticsearch with a bundled JDK. If you are already using a distribution with a bundled JDK, ensure the JAVA_HOME environment variable is not set.
Future versions of Elasticsearch will require Java 11; your Java version from [D:\javaTools\java\jdk1.8\jdk1.8.0_311\jre] does not meet this requirement. Consider switching to a distribution of Elasticsearch with a bundled JDK. If you are already using a distribution with a bundled JDK, ensure the JAVA_HOME environment variable is not set.
Warning: with JDK 8 on Windows, Elasticsearch may be unable to derive correct
ergonomic settings due to a JDK issue (JDK-8074459). Please use a newer
version of Java.
Warning: MaxDirectMemorySize may have been miscalculated due to JDK-8074459.
Please use a newer version of Java or set MaxDirectMemorySize explicitly.
[2022-09-20T00:18:22,269][INFO ][o.e.n.Node ] [LAPTOP-ET9MGQ9D] version[7.15.2], pid[26876], build[default/zip/93d5a7f6192e8a1a12e154a2b81bf6fa7309da0c/2021-11-04T14:04:42.515624022Z], OS[Windows 10/10.0/amd64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/1.8.0_311/25.311-b11]
[2022-09-20T00:18:22,270][INFO ][o.e.n.Node ] [LAPTOP-ET9MGQ9D] JVM home [D:\javaTools\java\jdk1.8\jdk1.8.0_311\jre], using bundled JDK [false]
[2022-09-20T00:18:22,271][INFO ][o.e.n.Node ] [LAPTOP-ET9MGQ9D] JVM arguments [-Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dio.netty.allocator.numDirectArenas=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.locale.providers=SPI,JRE, -Xms512m, -Xmx512m, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -Djava.io.tmpdir=C:\Users\niannian\AppData\Local\Temp\elasticsearch, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=data, -XX:ErrorFile=logs/hs_err_pid%p.log, -XX:+PrintGCDetails, -XX:+PrintGCDateStamps, -XX:+PrintTenuringDistribution, -XX:+PrintGCApplicationStoppedTime, -Xloggc:logs/gc.log, -XX:+UseGCLogFileRotation, -XX:NumberOfGCLogFiles=32, -XX:GCLogFileSize=64m, -XX:MaxDirectMemorySize=268435456, -Delasticsearch, -Des.path.home=D:\javaTools\elasticsearch-7.15.2-windows-x86_64\elasticsearch-7.15.2, -Des.path.conf=D:\javaTools\elasticsearch-7.15.2-windows-x86_64\elasticsearch-7.15.2\config, -Des.distribution.flavor=default, -Des.distribution.type=zip, -Des.bundled_jdk=true]
[2022-09-20T00:18:24,734][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [aggs-matrix-stats]
[2022-09-20T00:18:24,735][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [analysis-common]
[2022-09-20T00:18:24,735][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [constant-keyword]
[2022-09-20T00:18:24,735][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [frozen-indices]
[2022-09-20T00:18:24,735][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [ingest-common]
[2022-09-20T00:18:24,736][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [ingest-geoip]
[2022-09-20T00:18:24,736][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [ingest-user-agent]
[2022-09-20T00:18:24,736][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [kibana]
[2022-09-20T00:18:24,736][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [lang-expression]
[2022-09-20T00:18:24,736][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [lang-mustache]
[2022-09-20T00:18:24,736][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [lang-painless]
[2022-09-20T00:18:24,737][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [mapper-extras]
[2022-09-20T00:18:24,737][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [mapper-version]
[2022-09-20T00:18:24,737][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [parent-join]
[2022-09-20T00:18:24,737][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [percolator]
[2022-09-20T00:18:24,737][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [rank-eval]
[2022-09-20T00:18:24,737][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [reindex]
[2022-09-20T00:18:24,738][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [repositories-metering-api]
[2022-09-20T00:18:24,738][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [repository-encrypted]
[2022-09-20T00:18:24,738][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [repository-url]
[2022-09-20T00:18:24,738][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [runtime-fields-common]
[2022-09-20T00:18:24,738][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [search-business-rules]
[2022-09-20T00:18:24,738][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [searchable-snapshots]
[2022-09-20T00:18:24,739][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [snapshot-repo-test-kit]
[2022-09-20T00:18:24,739][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [spatial]
[2022-09-20T00:18:24,739][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [transform]
[2022-09-20T00:18:24,739][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [transport-netty4]
[2022-09-20T00:18:24,739][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [unsigned-long]
[2022-09-20T00:18:24,739][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [vector-tile]
[2022-09-20T00:18:24,740][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [vectors]
[2022-09-20T00:18:24,740][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [wildcard]
[2022-09-20T00:18:24,741][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [x-pack-aggregate-metric]
[2022-09-20T00:18:24,741][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [x-pack-analytics]
[2022-09-20T00:18:24,741][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [x-pack-async]
[2022-09-20T00:18:24,741][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [x-pack-async-search]
[2022-09-20T00:18:24,742][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [x-pack-autoscaling]
[2022-09-20T00:18:24,742][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [x-pack-ccr]
[2022-09-20T00:18:24,742][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [x-pack-core]
[2022-09-20T00:18:24,743][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [x-pack-data-streams]
[2022-09-20T00:18:24,743][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [x-pack-deprecation]
[2022-09-20T00:18:24,743][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [x-pack-enrich]
[2022-09-20T00:18:24,744][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [x-pack-eql]
[2022-09-20T00:18:24,744][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [x-pack-fleet]
[2022-09-20T00:18:24,744][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [x-pack-graph]
[2022-09-20T00:18:24,744][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [x-pack-identity-provider]
[2022-09-20T00:18:24,745][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [x-pack-ilm]
[2022-09-20T00:18:24,745][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [x-pack-logstash]
[2022-09-20T00:18:24,745][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [x-pack-ml]
[2022-09-20T00:18:24,746][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [x-pack-monitoring]
[2022-09-20T00:18:24,746][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [x-pack-ql]
[2022-09-20T00:18:24,746][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [x-pack-rollup]
[2022-09-20T00:18:24,747][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [x-pack-security]
[2022-09-20T00:18:24,747][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [x-pack-shutdown]
[2022-09-20T00:18:24,747][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [x-pack-sql]
[2022-09-20T00:18:24,748][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [x-pack-stack]
[2022-09-20T00:18:24,748][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [x-pack-text-structure]
[2022-09-20T00:18:24,748][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [x-pack-voting-only-node]
[2022-09-20T00:18:24,749][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] loaded module [x-pack-watcher]
[2022-09-20T00:18:24,749][INFO ][o.e.p.PluginsService ] [LAPTOP-ET9MGQ9D] no plugins loaded
[2022-09-20T00:18:25,122][INFO ][o.e.e.NodeEnvironment ] [LAPTOP-ET9MGQ9D] using [1] data paths, mounts [[Data (D:)]], net usable_space [179.3gb], net total_space [275.6gb], types [NTFS]
[2022-09-20T00:18:25,122][INFO ][o.e.e.NodeEnvironment ] [LAPTOP-ET9MGQ9D] heap size [494.9mb], compressed ordinary object pointers [true]
[2022-09-20T00:18:25,509][INFO ][o.e.n.Node ] [LAPTOP-ET9MGQ9D] node name [LAPTOP-ET9MGQ9D], node ID [BAsc73kuRoGXgt0sEC6BtA], cluster name [elasticsearch], roles [transform, data_frozen, master, remote_cluster_client, data, ml, data_content, data_hot, data_warm, data_cold, ingest]
[2022-09-20T00:18:28,973][INFO ][o.e.x.m.p.l.CppLogMessageHandler] [LAPTOP-ET9MGQ9D] [controller/35408] [Main.cc@122] controller (64 bit): Version 7.15.2 (Build 65497bb5299534) Copyright (c) 2021 Elasticsearch BV
[2022-09-20T00:18:29,409][INFO ][o.e.x.s.a.s.FileRolesStore] [LAPTOP-ET9MGQ9D] parsed [0] roles from file [D:\javaTools\elasticsearch-7.15.2-windows-x86_64\elasticsearch-7.15.2\config\roles.yml]
[2022-09-20T00:18:30,260][INFO ][o.e.i.g.LocalDatabases ] [LAPTOP-ET9MGQ9D] initialized default databases [[GeoLite2-Country.mmdb, GeoLite2-City.mmdb, GeoLite2-ASN.mmdb]], config databases [[]] and watching [D:\javaTools\elasticsearch-7.15.2-windows-x86_64\elasticsearch-7.15.2\config\ingest-geoip] for changes
[2022-09-20T00:18:30,263][INFO ][o.e.i.g.DatabaseRegistry ] [LAPTOP-ET9MGQ9D] initialized database registry, using geoip-databases directory [C:\Users\niannian\AppData\Local\Temp\elasticsearch\geoip-databases\BAsc73kuRoGXgt0sEC6BtA]
[2022-09-20T00:18:30,740][INFO ][o.e.t.NettyAllocator ] [LAPTOP-ET9MGQ9D] creating NettyAllocator with the following configs: [name=unpooled, suggested_max_allocation_size=1mb, factors={es.unsafe.use_unpooled_allocator=null, g1gc_enabled=false, g1gc_region_size=0b, heap_size=494.9mb}]
[2022-09-20T00:18:30,792][INFO ][o.e.d.DiscoveryModule ] [LAPTOP-ET9MGQ9D] using discovery type [zen] and seed hosts providers [settings]
[2022-09-20T00:18:31,155][INFO ][o.e.g.DanglingIndicesState] [LAPTOP-ET9MGQ9D] gateway.auto_import_dangling_indices is disabled, dangling indices will not be automatically detected or imported and must be managed manually
[2022-09-20T00:18:31,507][INFO ][o.e.n.Node ] [LAPTOP-ET9MGQ9D] initialized
[2022-09-20T00:18:31,507][INFO ][o.e.n.Node ] [LAPTOP-ET9MGQ9D] starting ...
[2022-09-20T00:18:31,520][INFO ][o.e.x.s.c.f.PersistentCache] [LAPTOP-ET9MGQ9D] persistent cache index loaded
[2022-09-20T00:18:32,341][INFO ][o.e.t.TransportService ] [LAPTOP-ET9MGQ9D] publish_address {127.0.0.1:9300}, bound_addresses {127.0.0.1:9300}, {[::1]:9300}
[2022-09-20T00:18:32,443][WARN ][o.e.b.BootstrapChecks ] [LAPTOP-ET9MGQ9D] the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured
[2022-09-20T00:18:32,452][INFO ][o.e.c.c.ClusterBootstrapService] [LAPTOP-ET9MGQ9D] no discovery configuration found, will perform best-effort cluster bootstrapping after [3s] unless existing master is discovered
[2022-09-20T00:18:35,471][INFO ][o.e.c.c.Coordinator ] [LAPTOP-ET9MGQ9D] setting initial configuration to VotingConfiguration{BAsc73kuRoGXgt0sEC6BtA}
[2022-09-20T00:18:35,585][INFO ][o.e.c.s.MasterService ] [LAPTOP-ET9MGQ9D] elected-as-master ([1] nodes joined)[{LAPTOP-ET9MGQ9D}{BAsc73kuRoGXgt0sEC6BtA}{RaQByXzFQlqIiS6Jyt2nZg}{127.0.0.1}{127.0.0.1:9300}{cdfhilmrstw} elect leader, _BECOME_MASTER_TASK_, _FINISH_ELECTION_], term: 1, version: 1, delta: master node changed {previous [], current [{LAPTOP-ET9MGQ9D}{BAsc73kuRoGXgt0sEC6BtA}{RaQByXzFQlqIiS6Jyt2nZg}{127.0.0.1}{127.0.0.1:9300}{cdfhilmrstw}]}
[2022-09-20T00:18:35,619][INFO ][o.e.c.c.CoordinationState] [LAPTOP-ET9MGQ9D] cluster UUID set to [bDkJ0xdVSEmptv2ZKuPySQ]
[2022-09-20T00:18:35,644][INFO ][o.e.c.s.ClusterApplierService] [LAPTOP-ET9MGQ9D] master node changed {previous [], current [{LAPTOP-ET9MGQ9D}{BAsc73kuRoGXgt0sEC6BtA}{RaQByXzFQlqIiS6Jyt2nZg}{127.0.0.1}{127.0.0.1:9300}{cdfhilmrstw}]}, term: 1, version: 1, reason: Publication{term=1, version=1}
[2022-09-20T00:18:35,753][INFO ][o.e.g.GatewayService ] [LAPTOP-ET9MGQ9D] recovered [0] indices into cluster_state
[2022-09-20T00:18:35,905][INFO ][o.e.c.m.MetadataIndexTemplateService] [LAPTOP-ET9MGQ9D] adding index template [.ml-stats] for index patterns [.ml-stats-*]
[2022-09-20T00:18:35,957][INFO ][o.e.c.m.MetadataIndexTemplateService] [LAPTOP-ET9MGQ9D] adding index template [.ml-state] for index patterns [.ml-state*]
[2022-09-20T00:18:36,012][INFO ][o.e.c.m.MetadataIndexTemplateService] [LAPTOP-ET9MGQ9D] adding index template [.ml-notifications-000002] for index patterns [.ml-notifications-000002]
[2022-09-20T00:18:36,067][INFO ][o.e.c.m.MetadataIndexTemplateService] [LAPTOP-ET9MGQ9D] adding index template [.ml-anomalies-] for index patterns [.ml-anomalies-*]
[2022-09-20T00:18:36,108][INFO ][o.e.c.m.MetadataIndexTemplateService] [LAPTOP-ET9MGQ9D] adding component template [metrics-mappings]
[2022-09-20T00:18:36,145][INFO ][o.e.h.AbstractHttpServerTransport] [LAPTOP-ET9MGQ9D] publish_address {127.0.0.1:9200}, bound_addresses {127.0.0.1:9200}, {[::1]:9200}
[2022-09-20T00:18:36,146][INFO ][o.e.n.Node ] [LAPTOP-ET9MGQ9D] started
[2022-09-20T00:18:36,157][INFO ][o.e.c.m.MetadataIndexTemplateService] [LAPTOP-ET9MGQ9D] adding component template [data-streams-mappings]
[2022-09-20T00:18:36,193][INFO ][o.e.c.m.MetadataIndexTemplateService] [LAPTOP-ET9MGQ9D] adding component template [synthetics-settings]
[2022-09-20T00:18:36,232][INFO ][o.e.c.m.MetadataIndexTemplateService] [LAPTOP-ET9MGQ9D] adding component template [logs-settings]
[2022-09-20T00:18:36,265][INFO ][o.e.c.m.MetadataIndexTemplateService] [LAPTOP-ET9MGQ9D] adding component template [logs-mappings]
[2022-09-20T00:18:36,295][INFO ][o.e.c.m.MetadataIndexTemplateService] [LAPTOP-ET9MGQ9D] adding component template [metrics-settings]
[2022-09-20T00:18:36,323][INFO ][o.e.c.m.MetadataIndexTemplateService] [LAPTOP-ET9MGQ9D] adding component template [synthetics-mappings]
[2022-09-20T00:18:36,366][INFO ][o.e.c.m.MetadataIndexTemplateService] [LAPTOP-ET9MGQ9D] adding index template [.watch-history-13] for index patterns [.watcher-history-13*]
[2022-09-20T00:18:36,399][INFO ][o.e.c.m.MetadataIndexTemplateService] [LAPTOP-ET9MGQ9D] adding index template [ilm-history] for index patterns [ilm-history-5*]
[2022-09-20T00:18:36,430][INFO ][o.e.c.m.MetadataIndexTemplateService] [LAPTOP-ET9MGQ9D] adding index template [.slm-history] for index patterns [.slm-history-5*]
[2022-09-20T00:18:36,457][INFO ][o.e.c.m.MetadataIndexTemplateService] [LAPTOP-ET9MGQ9D] adding component template [.deprecation-indexing-settings]
[2022-09-20T00:18:36,486][INFO ][o.e.c.m.MetadataIndexTemplateService] [LAPTOP-ET9MGQ9D] adding component template [.deprecation-indexing-mappings]
[2022-09-20T00:18:36,514][INFO ][o.e.c.m.MetadataIndexTemplateService] [LAPTOP-ET9MGQ9D] adding template [.monitoring-alerts-7] for index patterns [.monitoring-alerts-7]
[2022-09-20T00:18:36,583][INFO ][o.e.c.m.MetadataIndexTemplateService] [LAPTOP-ET9MGQ9D] adding template [.monitoring-es] for index patterns [.monitoring-es-7-*]
[2022-09-20T00:18:36,613][INFO ][o.e.c.m.MetadataIndexTemplateService] [LAPTOP-ET9MGQ9D] adding template [.monitoring-kibana] for index patterns [.monitoring-kibana-7-*]
[2022-09-20T00:18:36,643][INFO ][o.e.c.m.MetadataIndexTemplateService] [LAPTOP-ET9MGQ9D] adding template [.monitoring-logstash] for index patterns [.monitoring-logstash-7-*]
[2022-09-20T00:18:36,673][INFO ][o.e.c.m.MetadataIndexTemplateService] [LAPTOP-ET9MGQ9D] adding template [.monitoring-beats] for index patterns [.monitoring-beats-7-*]
[2022-09-20T00:18:36,702][INFO ][o.e.c.m.MetadataIndexTemplateService] [LAPTOP-ET9MGQ9D] adding index template [logs] for index patterns [logs-*-*]
[2022-09-20T00:18:36,729][INFO ][o.e.c.m.MetadataIndexTemplateService] [LAPTOP-ET9MGQ9D] adding index template [metrics] for index patterns [metrics-*-*]
[2022-09-20T00:18:36,759][INFO ][o.e.c.m.MetadataIndexTemplateService] [LAPTOP-ET9MGQ9D] adding index template [synthetics] for index patterns [synthetics-*-*]
[2022-09-20T00:18:36,785][INFO ][o.e.c.m.MetadataIndexTemplateService] [LAPTOP-ET9MGQ9D] adding index template [.deprecation-indexing-template] for index patterns [.logs-deprecation.*]
[2022-09-20T00:18:36,811][INFO ][o.e.x.i.a.TransportPutLifecycleAction] [LAPTOP-ET9MGQ9D] adding index lifecycle policy [ml-size-based-ilm-policy]
[2022-09-20T00:18:36,844][INFO ][o.e.x.i.a.TransportPutLifecycleAction] [LAPTOP-ET9MGQ9D] adding index lifecycle policy [metrics]
[2022-09-20T00:18:36,870][INFO ][o.e.x.i.a.TransportPutLifecycleAction] [LAPTOP-ET9MGQ9D] adding index lifecycle policy [synthetics]
[2022-09-20T00:18:36,905][INFO ][o.e.x.i.a.TransportPutLifecycleAction] [LAPTOP-ET9MGQ9D] adding index lifecycle policy [logs]
[2022-09-20T00:18:36,931][INFO ][o.e.x.i.a.TransportPutLifecycleAction] [LAPTOP-ET9MGQ9D] adding index lifecycle policy [watch-history-ilm-policy]
[2022-09-20T00:18:36,958][INFO ][o.e.x.i.a.TransportPutLifecycleAction] [LAPTOP-ET9MGQ9D] adding index lifecycle policy [ilm-history-ilm-policy]
[2022-09-20T00:18:36,989][INFO ][o.e.x.i.a.TransportPutLifecycleAction] [LAPTOP-ET9MGQ9D] adding index lifecycle policy [slm-history-ilm-policy]
[2022-09-20T00:18:37,016][INFO ][o.e.x.i.a.TransportPutLifecycleAction] [LAPTOP-ET9MGQ9D] adding index lifecycle policy [.deprecation-indexing-ilm-policy]
[2022-09-20T00:18:37,040][INFO ][o.e.x.i.a.TransportPutLifecycleAction] [LAPTOP-ET9MGQ9D] adding index lifecycle policy [.fleet-actions-results-ilm-policy]
[2022-09-20T00:18:37,091][INFO ][o.e.i.g.GeoIpDownloader ] [LAPTOP-ET9MGQ9D] updating geoip databases
[2022-09-20T00:18:37,093][INFO ][o.e.i.g.GeoIpDownloader ] [LAPTOP-ET9MGQ9D] fetching geoip databases overview from [https://geoip.elastic.co/v1/database?elastic_geoip_service_tos=agree]
[2022-09-20T00:18:37,152][INFO ][o.e.l.LicenseService ] [LAPTOP-ET9MGQ9D] license [f799f649-6304-4d80-a4e8-93cace01d014] mode [basic] - valid
[2022-09-20T00:18:37,153][INFO ][o.e.x.s.s.SecurityStatusChangeListener] [LAPTOP-ET9MGQ9D] Active license is now [BASIC]; Security is disabled
[2022-09-20T00:18:37,153][WARN ][o.e.x.s.s.SecurityStatusChangeListener] [LAPTOP-ET9MGQ9D] Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.15/security-minimal-setup.html to enable security.
[2022-09-20T00:18:38,225][INFO ][o.e.i.g.GeoIpDownloader ] [LAPTOP-ET9MGQ9D] updating geoip database [GeoLite2-ASN.mmdb]
[2022-09-20T00:18:40,621][INFO ][o.e.c.m.MetadataCreateIndexService] [LAPTOP-ET9MGQ9D] [.geoip_databases] creating index, cause [auto(bulk api)], templates [], shards [1]/[0]
[2022-09-20T00:18:40,788][INFO ][o.e.c.r.a.AllocationService] [LAPTOP-ET9MGQ9D] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.geoip_databases][0]]]).
[2022-09-20T00:18:41,424][INFO ][o.e.i.g.DatabaseRegistry ] [LAPTOP-ET9MGQ9D] downloading geoip database [GeoLite2-ASN.mmdb] to [C:\Users\niannian\AppData\Local\Temp\elasticsearch\geoip-databases\BAsc73kuRoGXgt0sEC6BtA\GeoLite2-ASN.mmdb.tmp.gz]
[2022-09-20T00:18:41,430][INFO ][o.e.i.g.GeoIpDownloader ] [LAPTOP-ET9MGQ9D] updated geoip database [GeoLite2-ASN.mmdb]
[2022-09-20T00:18:41,441][INFO ][o.e.i.g.GeoIpDownloader ] [LAPTOP-ET9MGQ9D] updating geoip database [GeoLite2-City.mmdb]
[2022-09-20T00:18:41,574][INFO ][o.e.i.g.DatabaseRegistry ] [LAPTOP-ET9MGQ9D] successfully reloaded changed geoip database file [C:\Users\niannian\AppData\Local\Temp\elasticsearch\geoip-databases\BAsc73kuRoGXgt0sEC6BtA\GeoLite2-ASN.mmdb]
[2022-09-20T00:18:44,728][INFO ][o.e.i.g.DatabaseRegistry ] [LAPTOP-ET9MGQ9D] downloading geoip database [GeoLite2-City.mmdb] to [C:\Users\niannian\AppData\Local\Temp\elasticsearch\geoip-databases\BAsc73kuRoGXgt0sEC6BtA\GeoLite2-City.mmdb.tmp.gz]
[2022-09-20T00:18:44,737][INFO ][o.e.i.g.GeoIpDownloader ] [LAPTOP-ET9MGQ9D] updated geoip database [GeoLite2-City.mmdb]
[2022-09-20T00:18:44,738][INFO ][o.e.i.g.GeoIpDownloader ] [LAPTOP-ET9MGQ9D] updating geoip database [GeoLite2-Country.mmdb]
[2022-09-20T00:18:45,428][INFO ][o.e.i.g.DatabaseRegistry ] [LAPTOP-ET9MGQ9D] successfully reloaded changed geoip database file [C:\Users\niannian\AppData\Local\Temp\elasticsearch\geoip-databases\BAsc73kuRoGXgt0sEC6BtA\GeoLite2-City.mmdb]
[2022-09-20T00:18:45,696][INFO ][o.e.i.g.DatabaseRegistry ] [LAPTOP-ET9MGQ9D] downloading geoip database [GeoLite2-Country.mmdb] to [C:\Users\niannian\AppData\Local\Temp\elasticsearch\geoip-databases\BAsc73kuRoGXgt0sEC6BtA\GeoLite2-Country.mmdb.tmp.gz]
[2022-09-20T00:18:45,703][INFO ][o.e.i.g.GeoIpDownloader ] [LAPTOP-ET9MGQ9D] updated geoip database [GeoLite2-Country.mmdb]
[2022-09-20T00:18:45,757][INFO ][o.e.i.g.DatabaseRegistry ] [LAPTOP-ET9MGQ9D] successfully reloaded changed geoip database file [C:\Users\niannian\AppData\Local\Temp\elasticsearch\geoip-databases\BAsc73kuRoGXgt0sEC6BtA\GeoLite2-Country.mmdb]
4.2 查看启动日志,找到此行.
4.3 访问 http://localhost:9200/
{
"name" : "LAPTOP-ET9MGQ9D", #主机名称
"cluster_name" : "elasticsearch", # 集群名称
"cluster_uuid" : "bDkJ0xdVSEmptv2ZKuPySQ", #集群UUid
"version" : {
"number" : "7.15.2", #版本号
"build_flavor" : "default",
"build_type" : "zip",
"build_hash" : "93d5a7f6192e8a1a12e154a2b81bf6fa7309da0c",
"build_date" : "2021-11-04T14:04:42.515624022Z",
"build_snapshot" : false,
"lucene_version" : "8.9.0", # lucene版本号
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
三个点–>更多工具–>扩展程序
将开发者模式打开-直接将文件拖进去-
请求地址: http://localhost:9200/_analyze
用post请求方式
{
"text" : "我想要个女朋友",
"analyzer" : "standard"
}
{
"tokens": [
{
"token": "我",
"start_offset": 0,
"end_offset": 1,
"type": "" ,
"position": 0
},
{
"token": "想",
"start_offset": 1,
"end_offset": 2,
"type": "" ,
"position": 1
},
{
"token": "要",
"start_offset": 2,
"end_offset": 3,
"type": "" ,
"position": 2
},
{
"token": "个",
"start_offset": 3,
"end_offset": 4,
"type": "" ,
"position": 3
},
{
"token": "女",
"start_offset": 4,
"end_offset": 5,
"type": "" ,
"position": 4
},
{
"token": "朋",
"start_offset": 5,
"end_offset": 6,
"type": "" ,
"position": 5
},
{
"token": "友",
"start_offset": 6,
"end_offset": 7,
"type": "" ,
"position": 6
}
]
}
可以看到分词的结果不符合我们的语言标准.比如 友在我们心中不算一个词,.应该是女朋友 或者朋友 那如何实现呢,这里我们就需要用到ik分词器的支持了,下面我们来安装ik分词器
到你安装的elasticsearch的\plugins 地址下
重启es
ik分词器有两个分词器 ik_smart 智能分词 和 ik_max_word 最大粒度分词
{
"tokens": [
{
"token": "我",
"start_offset": 0,
"end_offset": 1,
"type": "CN_CHAR",
"position": 0
},
{
"token": "想要",
"start_offset": 1,
"end_offset": 3,
"type": "CN_WORD",
"position": 1
},
{
"token": "个",
"start_offset": 3,
"end_offset": 4,
"type": "CN_CHAR",
"position": 2
},
{
"token": "女朋友",
"start_offset": 4,
"end_offset": 7,
"type": "CN_WORD",
"position": 3
}
]
}
{
"tokens": [
{
"token": "我",
"start_offset": 0,
"end_offset": 1,
"type": "CN_CHAR",
"position": 0
},
{
"token": "想要",
"start_offset": 1,
"end_offset": 3,
"type": "CN_WORD",
"position": 1
},
{
"token": "个",
"start_offset": 3,
"end_offset": 4,
"type": "CN_CHAR",
"position": 2
},
{
"token": "女朋友",
"start_offset": 4,
"end_offset": 7,
"type": "CN_WORD",
"position": 3
},
{
"token": "朋友",
"start_offset": 5,
"end_offset": 7,
"type": "CN_WORD",
"position": 4
}
]
}
IKAnalyzer.cfg.xml - 为ik分词器的配置文件-用户可以在这里配置自己的扩展字典
新建一个 mywod.dic
{
"tokens": [
{
"token": "张晓婷",
"start_offset": 0,
"end_offset": 3,
"type": "CN_WORD",
"position": 0
}
]
}