摘要:
课程大纲 1、multivalue field { "tags": [ "tag1", "tag2" ]} 建立索引时与string是一样的,数据类型不能混 2、empty field null,[],[null] 3、object field PUT /company/employee/1 { " 阅读全文
posted @ 2024-10-02 00:03
5765809
阅读(12)
评论(0)
推荐(0)
摘要:
1、核心的数据类型 string byte,short,integer,long float,double boolean date 2、dynamic mapping 根据field的值,对值的类型进行推断,比如 true 或者 false 就会推断成 boolean类型 true or fals 阅读全文
posted @ 2024-10-02 00:03
5765809
阅读(10)
评论(0)
推荐(0)
摘要:
1、如何建立索引 analyzed:可以被分次 not_analyzed:不可以被分次 no:不可以被搜索到 2、修改mapping 只能创建index时手动建立mapping,或者新增field mapping,但是不能update field mapping PUT /website { "ma 阅读全文
posted @ 2024-10-02 00:03
5765809
阅读(13)
评论(0)
推荐(0)
摘要:
(1)往es里面直接插入数据,es会自动建立索引,同时建立type以及对应的mapping (2)mapping中就自动定义了每个field的数据类型 (3)不同的数据类型(比如说text和date),可能有的是exact value,有的是full text (4)exact value,在建立倒 阅读全文
posted @ 2024-10-02 00:02
5765809
阅读(12)
评论(0)
推荐(0)
摘要:
1、query string分词 query string必须以和index建立时相同的analyzer进行分词 query string对exact value和full text的区别对待 date:exact value _all:full text 比如我们有一个document,其中有一个 阅读全文
posted @ 2024-10-02 00:02
5765809
阅读(27)
评论(0)
推荐(0)
摘要:
1、什么是分词器 切分词语,normalization(提升recall召回率) 给你一段句子,然后将这段句子拆分成一个一个的单个的单词,同时对每个单词进行normalization(时态转换,单复数转换),分瓷器 recall,召回率:搜索的时候,增加能够搜索到的结果的数量 character f 阅读全文
posted @ 2024-10-02 00:01
5765809
阅读(23)
评论(0)
推荐(0)
摘要:
1、exact value 必须要精确匹配才可以搜索出来 2017-01-01,exact value,搜索的时候,必须输入2017-01-01,才能搜索出来 如果你输入一个01,是搜索不出来的 2、full text 类似模糊匹配 (1)缩写 vs. 全程:cn vs. china (2)格式转化 阅读全文
posted @ 2024-10-01 20:15
5765809
阅读(31)
评论(0)
推荐(0)
摘要:
doc1:I really liked my small dogs, and I think my mom also liked them. doc2:He never liked any dogs, so I hope that my mom will not expect me to liked 阅读全文
posted @ 2024-10-01 20:15
5765809
阅读(28)
评论(0)
推荐(0)
摘要:
1、query string基础语法 GET /test_index/test_type/_search?q=test_field:test GET /test_index/test_type/_search?q=+test_field:test GET /test_index/test_type/ 阅读全文
posted @ 2024-10-01 20:14
5765809
阅读(39)
评论(0)
推荐(0)
摘要:
插入几条数据,让es自动为我们建立一个索引 PUT /website/article/1 { "post_date": "2017-01-01", "title": "my first article", "content": "this is my first article in this we 阅读全文
posted @ 2024-10-01 20:14
5765809
阅读(20)
评论(0)
推荐(0)
浙公网安备 33010602011771号