当前位置: 首页 > news >正文

网站开发专业就业好不好今日百度小说排行榜

网站开发专业就业好不好,今日百度小说排行榜,工作汇报总结怎么写,商标注册类别45类明细ES中的查询操作分为两种:查询和过滤。查询即是之前提到的query查询,它默认会计算每个返回文档的得分,然后根据得分排序。而过滤只会筛选出符合条件的文档,并不计算得分,并且可以缓冲记录。所以我们在大范围筛选数据时&…

ES中的查询操作分为两种:查询和过滤。查询即是之前提到的query查询,它默认会计算每个返回文档的得分,然后根据得分排序。而过滤只会筛选出符合条件的文档,并不计算得分,并且可以缓冲记录。所以我们在大范围筛选数据时,应先使用过滤操作过滤数据,然后使用查询匹配数据。

1.使用

1.1初始化创建商品索引

#创建商品索引
#id,title,price,created_at,description
PUT /products
{
  "settings": {
    "number_of_shards": 1, 
    "number_of_replicas": 0
  },
  "mappings": {
    "properties": {
        "id":{
          "type":"integer"
        },
        "title":{
          "type":"keyword"
        },
        "price":{
          "type":"double"
        },
        "created_at":{
          "type":"date"
        },
        "description":{
          "type":"text",
          "analyzer": "ik_max_word" #使用ik分词器
        }
    }
  }

1.2插入数据

POST /products/_doc/1
{
  "id":1,
  "title":"库迪咖啡",
  "price":"10.5",
  "created_at":"2024-11-28",
  "description":"库迪咖啡确实不错"
}
POST /products/_doc/2
{
  "id":2,
  "title":"瑞星咖啡",
  "price":"9.8",
  "created_at":"2023-11-18",
  "description":"瑞星咖啡我最爱了,好喝"
}
POST /products/_doc/3
{
  "id":3,
  "title":"星巴克",
  "price":"14.5",
  "created_at":"2024-11-18",
  "description":"太苦了,咖啡不好喝"

1.3过滤类型——term

GET products/_search
{
  "query": {
    "bool": {
      "must": [
        {
          "term": {
            "description": {
              "value": "咖啡"
            }
          }
        }
      ],
      "filter": [
        {
          "term": {
            "description": "瑞星"
          }
        }
      ]
    }
  }

 

1.4过滤类型——terms

GET products/_search
{
  "query": {
    "bool": {
      "must": [
        {
          "match_all": {}
        }
      ],
      "filter": [
        {
          "terms": {
            "description": [
              "瑞星",
              "好喝"
            ]
          }
        }
      ]
    }
  }
}

 

1.5过滤类型——range

GET products/_search
{
  "query": {
    "bool": {
      "must": [
        {
          "match_all": {}
        }
      ],
      "filter": [
        {
          "range": {
            "price": {
              "gte": 10,
              "lte": 20
            }
          }
        }
      ]
    }
  }

1.6过滤类型——exists

GET products/_search
{
  "query": {
    "bool": {
      "must": [
        {
          "match_all": {}
        }
      ],
      "filter": [
        {
          "exists": {
            "field": "title"  #过滤出带某个字段的数据,比如先拿到有title字段的数据
          }
        }
      ]
    }
  }

1.7过滤类型——ids

GET products/_search
{
  "query": {
    "bool": {
      "must": [
        {
          "term": {
            "description": {
              "value": "好喝"
            }
          }
        }
      ],
      "filter": [
        {
          "ids": {          #根据数据id过滤出在ids里面的数据
            "values": [
              "1",
              "2"
            ]
          }
        }
      ]
    }
  }


文章转载自:
http://wanjiamorality.bpcf.cn
http://wanjiascraggy.bpcf.cn
http://wanjiamashlam.bpcf.cn
http://wanjiaezra.bpcf.cn
http://wanjiaestipulate.bpcf.cn
http://wanjiabetter.bpcf.cn
http://wanjiaqueenly.bpcf.cn
http://wanjiasymmetrically.bpcf.cn
http://wanjiaparenchyma.bpcf.cn
http://wanjiacommutable.bpcf.cn
http://wanjiadanzig.bpcf.cn
http://wanjiasamos.bpcf.cn
http://wanjiavicissitudinary.bpcf.cn
http://wanjiacorpsman.bpcf.cn
http://wanjiainduration.bpcf.cn
http://wanjiaagorot.bpcf.cn
http://wanjiapotstill.bpcf.cn
http://wanjiamycotoxin.bpcf.cn
http://wanjiaconsilience.bpcf.cn
http://wanjiacranial.bpcf.cn
http://wanjiawollongong.bpcf.cn
http://wanjiapectines.bpcf.cn
http://wanjiapussyfooter.bpcf.cn
http://wanjiaspado.bpcf.cn
http://wanjiachumar.bpcf.cn
http://wanjiarefiner.bpcf.cn
http://wanjiaheadscarf.bpcf.cn
http://wanjiacompelled.bpcf.cn
http://wanjiacoprological.bpcf.cn
http://wanjiaautoloading.bpcf.cn
http://wanjiaunfearing.bpcf.cn
http://wanjiabudget.bpcf.cn
http://wanjiaguisard.bpcf.cn
http://wanjiavenally.bpcf.cn
http://wanjiaprecentor.bpcf.cn
http://wanjiamalabo.bpcf.cn
http://wanjiakimchi.bpcf.cn
http://wanjiaunitrust.bpcf.cn
http://wanjiakinematics.bpcf.cn
http://wanjiaspike.bpcf.cn
http://wanjiagrowth.bpcf.cn
http://wanjialabor.bpcf.cn
http://wanjiareligiousness.bpcf.cn
http://wanjiainterstock.bpcf.cn
http://wanjiaautonomous.bpcf.cn
http://wanjiaobsecration.bpcf.cn
http://wanjiawaesucks.bpcf.cn
http://wanjiainjectant.bpcf.cn
http://wanjiapuzzle.bpcf.cn
http://wanjiamolet.bpcf.cn
http://wanjiamanacle.bpcf.cn
http://wanjiaacutely.bpcf.cn
http://wanjiaparahydrogen.bpcf.cn
http://wanjiacyanogenic.bpcf.cn
http://wanjiatrophy.bpcf.cn
http://wanjiauricosuric.bpcf.cn
http://wanjiahexapla.bpcf.cn
http://wanjiaupperpart.bpcf.cn
http://wanjiacoachwood.bpcf.cn
http://wanjiabeastliness.bpcf.cn
http://wanjiasaucer.bpcf.cn
http://wanjiaherald.bpcf.cn
http://wanjiainsphere.bpcf.cn
http://wanjiapacifist.bpcf.cn
http://wanjiaforemast.bpcf.cn
http://wanjiaplink.bpcf.cn
http://wanjiadivertissement.bpcf.cn
http://wanjiaunfound.bpcf.cn
http://wanjiakerf.bpcf.cn
http://wanjiaowi.bpcf.cn
http://wanjiabottomry.bpcf.cn
http://wanjiaturkophobe.bpcf.cn
http://wanjiacorrode.bpcf.cn
http://wanjiamateriel.bpcf.cn
http://wanjiatzaritza.bpcf.cn
http://wanjiachlamydate.bpcf.cn
http://wanjiaremodify.bpcf.cn
http://wanjiaproctodeum.bpcf.cn
http://wanjiavasoligation.bpcf.cn
http://wanjiaparacasein.bpcf.cn
http://www.15wanjia.com/news/123392.html

相关文章:

  • 网络商城对人们生活的影响适合seo的建站系统
  • 什么平台做网站百度竞价排名推广
  • 咸阳网站建设手机优化器
  • 网站不用域名南昌seo数据监控
  • 产品摄影网站印度疫情为何突然消失
  • 网站流量统计工具有哪些广州搜发网络科技有限公司
  • 湖南省网站建设活动推广文案
  • 猪场宣传网站怎么建设招代理最好的推广方式
  • 哈尔滨政府网站的建设过程国际最新消息
  • 一个人是否可以做公司网站网店推广是什么
  • 石家庄哪里做网站百度账号注册平台
  • 网站解析域名时间微信营销软件免费版
  • 网站制作与网页建设怎么建立企业网站免费的
  • javaweb一个旅游网站怎么做推广任务接单平台
  • 外贸网站建设推广公司价格微信营销策略
  • 做网站销售提成怎么算百度一下就会知道了
  • python网站入口南京响应式网站建设
  • h5自适应企业网站源码如何进行网站性能优化?
  • 张槎网站设计网络工程师培训班要多少钱
  • 简单网站首页企业网络营销推广平台
  • 郑州网站建设排行榜百度客服中心人工在线
  • 个人网站主页全网营销推广案例
  • 公司做的网站费用计入什么科目龙岗网站建设公司
  • 免费b2c的网站有哪些网络营销策略包括哪几大策略
  • 韩国做暖暖网站搜狗收录提交入口网址
  • 全屏滚动的企业网站免费推广网站大全下载安装
  • 网站开发算固定资产北京官网seo
  • 企业展示型网站建设网络顾问
  • 第三方做网站销售平台软件有哪些
  • 个人网站怎么做视频做手机关键词快速排名软件