Giter Site home page Giter Site logo

myalice's Introduction

项目参与人

项目初始成员,排名不分先后:
杨林林 github:ylinlin
杜国龙 github:guduey
唐亚峰 github:levin950825
赵巍 github:radarxn
黄飞 github:garyhuang

PageHelper mybatis 分页插件

依赖jar包:
<dependency>
    <groupId>com.github.pagehelper</groupId>
    <artifactId>pagehelper</artifactId>
    <version>5.0.0</version>
</dependency>
		
<dependency>
    <groupId>com.github.pagehelper</groupId>
    <artifactId>pagehelper-spring-boot-starter</artifactId>
    <version>1.1.0</version>
</dependency>

配置:@AutoConfigureBefore(PageHelperAutoConfiguration.class)
aplication.properties 配置参考 com.github.pagehelper.autoconfigure.PageHelperProperties

使用:
Page<QuestionOrder> startPage = PageHelper.startPage(pageId, 10);
questionOrderMapper.query(); 
首先执行 PageHelper.startPage(pageId, 10) 之后第一个查询方法会进行分页处理 
返回参数在 startPage里, 获取查询结果:
startPage.getTotal() //获取记录条数
startPage.getResult() //获取查询结果

es 分词插件

curl -XPUT 'http://127.0.0.1:19200/myalice?pretty' -d '{
  "settings": {
    "analysis": {
      "analyzer": {
        "my_analyzer": {
          "tokenizer": "my_tokenizer"
        },
        "my_ik": {
          "tokenizer": "ik"
        }
      },
      "tokenizer": {
        "my_tokenizer": {
          "type": "classic",
          "max_token_length": 150
        },
        "ik": {
          "type": "ik_max_word",
          "max_token_length": 150
        }
      }
    }
  },
  "mappings": {
    "answer": {
      "properties": {
        "question_id": {
          "type": "string",
          "analyzer": "my_analyzer"
        }
      }
    },
    "question": {
      "properties": {
        "title": {
          "type": "string",
          "analyzer": "my_ik"
        }
      }
    }
  }
}'

myalice's People

Contributors

garyhuang avatar levin950825 avatar hfmbook 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.