zoukankan      html  css  js  c++  java
  • springbootstarterdataelasticsearch实体注解说明

    //实体类上注解
    @Document(indexName = "china")      对应的索引为china
    @Setting(shards=1, replicas = 0)    创建一个索引的分片,索引的副本数量          
    
    //属性上注解
    @Field(type=FieldType.Text, analyzer=“ik_max_word”) 表示该字段是一个文本,并作最大程度拆分,默认建立索引
    
    @Field(type=FieldType.Text,index=false) 表示该字段是一个文本,不建立索引
    
    @Field(type=FieldType.Date) 表示该字段是一个文本,日期类型,默认不建立索引
    
    @Field(type=FieldType.Long) 表示该字段是一个长整型,默认建立索引
    
    @Field(type=FieldType.Keyword) 表示该字段内容是一个文本并作为一个整体不可分,默认建立索引
    
    @Field(type=FieldType.Float) 表示该字段内容是一个浮点类型并作为一个整体不可分,默认建立索引
    
    date 、floatlong都是不能够被拆分的
    
    参考链接:https://blog.csdn.net/nlcexiyue/article/details/111386816
    
  • 相关阅读:
    c语言字符串_续
    c语言中文件的操作
    Linux基础知识
    netstat
    wireshark 过滤规则
    常用cmd命令
    优化过的redis封装类
    二十三岁,新的起点
    计划看的书目
    [转载]爱上一个给予你正能量的人
  • 原文地址:https://www.cnblogs.com/InternetJava/p/15731282.html
Copyright © 2011-2022 走看看