Giter Site home page Giter Site logo

mysqltoelasticsearch's Introduction

从Mysql到Elasticsearch

流程

MySQL -> Binlog -> kafka -> consumer -> elasticsearchEs —> query -> keyword -> 搜索结果

  1. 导入sql database.sql

  2. 配置文件 配置 数据库 kafka es 相关配置

以下示列配置

mysql:
  host: 127.0.0.1
  port: 3306
  user: root
  password: root
  database: test
es:
  host: http://127.0.0.1
  port: 9200
  user:
  password:
kafka:
  host: localhost
  port: 9092
  topic: kafka_log
  1. binlog To kafka
go run main.go -s=binlog
  1. kafka To elasticsearchEs
go run main.go -s=es
  1. http 展示
go run main.go -s=http

访问url: http://127.0.0.1:8088/CategorySearch

筛选 做了nicename的精准匹配 http://127.0.0.1:8088/CategorySearch?name=news

mysqltoelasticsearch's People

Contributors

supermanqlm avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.