Giter VIP home page Giter VIP logo

springboot-elasticsearch's Introduction

springboot-elasticsearch

基于springboot的web项目,通过elasticsearch提供的Java API 进行查询操作.

起因

项目在一个查询要在亚秒级计算(分组、累加、平均)大量数据的结果。官方提供的API过于简单,自己在做项目中遇到了一些坑,并总结了一些API的使用,简单分享一下。

服务版本

首先安装一个自己的elasticsearch服务

RPM方式安装并启动访问

sudo rpm --install xxx.rpm

sudo service elasticsearch start

访问:xxxx:9200

{
  "name" : "X5m9ca9",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "Llayl6QoQUSl4JcMIt0L5g",
  "version" : {
    "number" : "5.5.1",
    "build_hash" : "19c13d0",
    "build_date" : "2017-07-18T20:44:24.823Z",
    "build_snapshot" : false,
    "lucene_version" : "6.6.0"
  },
  "tagline" : "You Know, for Search"
}

安装启动完毕

程序

demo是基于springboot快速构建了一个web应用,通过单元测试的方式,来验证方法

参考链接

Search API

BulkProcessor

有一些坑是我领导踩得,部分代码已得授权。

springboot-elasticsearch's People

Contributors

whiney avatar

Watchers

James Cloos 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.