当前位置:网站首页>Es learning
Es learning
2022-06-25 10:31:00 【leon__ k】
1、 Pit encountered during installation
install ES:
- It needs to be closed in the configuration ssl verification
- There is information such as printing password during installation , Can copy , It can also be used. elasticsearch-reset-password.bat Reset password
install kibana:
- Need configuration es Address
- Prompt no login , Configured account password , Then prompt that it cannot be used elastic account number , It can be used token, use elasticsearch-service-tokens.bat Got token, Start successfully after configuration ( To obtain an account, you need to be elastic/kibana Namespace It can't be elastic/fleet-server Of )
2、 brief introduction
3、 Easy to use
check : Example
Change : Example
// link
$e = \Elasticsearch\ClientBuilder::create()
->setBasicAuthentication('elastic', ' password ') // User name, password
//->setApiKey() //api Sign in ( user name 2 choose 1)
->setHosts(['127.0.0.1:9200']) // Change port
->build();
// Version information
$elastic = $e->info();
// Index exists
$e->indices()->exists(['index' => 'k']);
// Create a simple index
$e->indices()->create(['index' => 'k']);
// Get index map
$e->indices()->getMapping(['index' => 'k']);
// Update index mapping
$client->update($params);
// increase
$e->index(['index' => 'k', 'body' => ['dd' => date('Y-m-d H:i:s')]])
//ID Just check
$e->get(['index' => 'k', 'id' => 'PbudUYEBuG61Ky6oi7Pk'])
// Fuzzy query
$params = [
'index' => 'k',
'body' => [
'query' => [
'match' => [
'dd' => '2022'
]
]
]
];
$e->search($params);
// Change
$params = [
'index' => 'k',
'id' => 'P7vCUYEBuG61Ky6otrO5',
'body' => [
'doc' => [
'dd' => '2022'
]
]
];
$e->update($params);
// Delete
$e->deleteByQuery($params);
// Delete index
$e->indices()->delete(['index' => 'k']);
边栏推荐
- BUG-00x bug description + resolve ways
- WPF 绑定表达式和绑定数据源(一)
- Redis (II) distributed locks and redis cluster construction
- String implementation strstr()
- Basic usage and principle of schedulemaster distributed task scheduling center
- Guiding principle - read source code
- How to apply for a widget on wechat how to get a widget on wechat
- Byte interview: under what scenario will syn packets be discarded?
- The title of my composition is - "my district head father"
- Think about it
猜你喜欢
[RPC] i/o model - Rector mode of bio, NiO, AIO and NiO
Network protocol learning -- lldp protocol learning
【历史上的今天】6 月 24 日:网易成立;首届消费电子展召开;世界上第一次网络直播
Opencv learning (I) -- environment building
ScheduleMaster分布式任务调度中心基本使用和原理
Free platform for wechat applet making, steps for wechat applet making
我的作文题目是——《我的区长父亲》
ES 学习
Redis(一)原理与基本使用
How to do the wechat selling applet? How to apply for applets
随机推荐
Redis (II) distributed locks and redis cluster construction
我希望按照我的思路尽可能将canvas基础讲明白
性能之文件系统篇
Binder explanation of Android interview notes
Houdini图文笔记:Could not create OpenCL device of type (HOUDINI_OCL_DEVICETYPE)问题的解决
新学派:不诈骗经济学
Floating window --- create an activity floating window (can be dragged)
Redis (I) principle and basic use
Flask blog practice - realize the latest articles and search in the sidebar
成长:如何深度思考与学习
[paper reading | deep reading] line: large scale information network embedding
浅谈二叉树
Principle of distribution: understanding the gossip protocol
This is enough for request & response
MCU development -- face recognition application based on esp32-cam
如何在Microsoft Exchange 2010中安装SSL证书
《天天数学》连载52:二月二十日
What is CRA
Kotlin arrays and collections (1) {create arrays, use arrays, use for in loops to traverse arrays, use array indexes, and multi-dimensional arrays}
WPF binding expression and binding data source (I)