Coder Social home page Coder Social logo

hhy5277 / movie-elasticsearch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cbwleft/movie-elasticsearch

0.0 1.0 0.0 97 KB

使用 SpringBoot2.0+ElasticSearch 实现的开源电影搜索引擎

Home Page: http://s.cbwleft.top

Dockerfile 0.33% Java 82.83% CSS 0.32% JavaScript 0.52% FreeMarker 15.99%

movie-elasticsearch's Introduction

movie-elasticsearch

简介

使用 SpringBoot2.0 + ElasticSearch + Jest 实现的电影搜索网站
试一下

本地部署

  • 启动 ElasticSearch 6.X+
  • 修改 application.properties 中的 spring.elasticsearch.jest.uris 参数
  • 启动 SpringBoot 项目
  • 访问 localhost:8080/crawl 开启爬虫
  • 访问 localhost:8080 开始搜索

Docker 运行(需要先行安装 ElasticSearch)

docker run -e spring.elasticsearch.jest.uris="http://elasticsearch:9200" -p 8080:8080 cbwleft/movie-elasticsearch

Docker Compose 运行(包含 ElasticSearch)

进入项目根目录运行:docker-compose up

为何要写这个 demo

在学习 ElasticSearch 的过程中,发现 ElasticSearch 的 Java 客户端选择太多,使用两种不同的通讯协议,而且 2.X 和 5.X+ 版本差异较大。
这种现象对于选择困难症患者来说不是非常友好,本来 spring-data-elasticsearch 应该是首要选择,但是我发现 SpringBoot 官方文档中首先推荐使用的是 Jest, 其次才是自家的 spring-data-elasticsearch。
深入使用后发现,spring-data-elasticsearch 基于 TransportClient,这个客户端使用 Java 序列化机制(9300 端口)通讯,ElasticSearch 官方准备废弃该客户端。
应该使用 REST 客户端(9200 端口)代替。这就让 Jest 成了该项目的首选。

参考资料

movie-elasticsearch's People

Contributors

bus-copilot avatar cbwleft 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.