notes

ElasticSearch 检索内部原理

PokPok
相关性计算 首先通过下面的更新语句,插入几条语句: PUT /megacorp/employee/1 { "first_name" : "John", "last_name" : "Smith", "age" : 25, "about" : "I love to go rock climbing", "interests": [ "sports", "music" ] } PUT /megacorp/employee/2 { "first_name" : "Jane", "last_name" : "Smith", "age" : 32, "about" : "I like to collect rock albums", "interests": [ "music" ] } PUT /megacorp/employee/3 { "first_name" : "Douglas", "last_name" : "Fir", "age" : 35, "about": "I like to build cabinets", "interests": [ "forestry" ] } 索引

ElasticSearch 基础使用和理解

PokPok
部署和启动 docker-compose.yml version: '2.2' services: node01: image: docker.elastic.co/elasticsearch/elasticsearch:7.11.1 container_name: node01 environment: - node.name=node01 - cluster.name=es-cluster-7 - discovery.seed_hosts=node01,node02,node03 - cluster.initial_master_nodes=node01,node02,node03 - "ES_JAVA_OPTS=-Xms128m -Xmx128m" ulimits: memlock: soft: -1 hard: -1 volumes: - es-data01:/usr/share/elasticsearch/data ports: - 9200:9200 - 9300:9300 networks: - es-network node02: image: docker.elastic.co/elasticsearch/elasticsearch:7.11.1 container_name: node02 environment: - node.name=node02 - cluster.name=es-cluster-7 - discovery.seed_hosts=node01,node02,node03 - cluster.initial_master_nodes=node01,node02,node03 - "ES_JAVA_OPTS=-Xms128m -Xmx128m" ulimits: memlock: soft: -1 hard: -1 volumes: - es-data02:/usr/share/elasticsearch/data ports: - 9201:9201 - 9301:9301 networks: - es-network node03: image: docker.elastic.co/elasticsearch/elasticsearch:7.11.1 container_name: node03 environment: - node.name=node03 - cluster.name=es-cluster-7 - discovery.seed_hosts=node01,node02,node03 - cluster.initial_master_nodes=node01,node02,node03 - "ES_JAVA_OPTS=-Xms128m -Xmx128m" ulimits: memlock: soft: -1 hard: -1

实效性软件构建的途径-下

PokPok
前言 如果一次性总结,文章太过于冗长,上部分更加是一种在编程中会碰到的技术细节,而这一部分是一些编程中需要记住的良好习惯。 1. 养成估算的习惯 1000字节数据通过路由器需要多少时间?类似这样的问题需要有个大

实效性软件构建的途径-上

PokPok
前言 无意中看到了这本书,译名是程序员修炼之道,想尝试在这本书中找到一些跟软件构建相关问题的答案。这本书虽然是上个世纪出版的,要注意时代的局限性和过期的经验,进行自我验证,但一遍看下来,对我来说,干货还