Giter VIP home page Giter VIP logo

spring-data-es-xmldemo's Introduction

spring-data-es-xmldemo

spring-data-elasticsearch xml方式搜索服务搭建

注意事项

1、spring-data-elasticsearch 和sping 版本注意冲突 例子使用的elasticsearch2.4 spring4.3.8。 如果你使用的是别的版本请根据spring-data-elasticsearch中spring-tx的版本来引入其它spring的版本。

2、GUAVA jar冲突问题 项目中严格注意其它jar包中guava与es依赖的guava冲突

3、字段索引问题使用 :如果要取出来用就store,只查询就不用store

4、@Document 不支持驼峰命名 必须全部为小写

5、字符串类型建立索引添加注解 @Field(type = FieldType.String, analyzer="ik", searchAnalyzer="ik", store = true) analyzer是建立索引使用的分词,searchAnalyzer是查询时候使用的分词

6、@GeoPointField 地理坐标注解 在字段上类型是String经纬度顺序:lat纬度,lon经度 "40.715,-74.011" 字段类型为double[]数组或point则不可这么使用

7、时间字段索引@Field( type = FieldType.Date, format = DateFormat.custom, pattern = "yyyy-MM-dd HH:mm:ss", store = true) 还需要配合 @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss") 一起使用。可参考PlotVO代码。

spring-data-es-xmldemo's People

Contributors

l316476844 avatar

Watchers

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