platform.md 1.5 KB

demo 说明

所需组件:

  1. Elasticsearch (版本建议7X)默认端口 9200 ingest-attachment(文本抽取组件) analysis-ik (必须与Es版本相同)
  2. Kibana(与Es版本一致) 默认端口 5610
  3. JDK1.8
  4. Mysql

Es操作说明

需在 kidana Dev Tools 中创建文本抽取管道 否则文件无法解析 PUT /_ingest/pipeline/attachment {

"description": "attachment information",
"processors": [
    {
        "attachment": {
            "field": "file",
            "ignore_missing": true
        }
    },
    {
        "remove": {
            "field": "file"
        }
    }
]

}

创建索引: 该操作可依赖实体注解完成,analyzer(写入时分词),searchAnalyzer(搜索时分词) 分词参数不可丢失 否则会影响搜索

PUT /fileindex { "mappings": {

"properties": {
  "id":{
    "type": "keyword"
  },
  "content":{
    "type": "text",
    "analyzer": "ik_max_word",
    "searchAnalyzer" = "ik_max_word"
  },
  "path":{
    "type": "text"
  },
  "file":{
    "type": "text",
    "analyzer": "ik_max_word",
    "searchAnalyzer" = "ik_max_word"
  },
  "attachment": {
    "properties": {
      "file":{
        "type": "text",
        "analyzer": "ik_smart",
        "searchAnalyzer" = "ik_max_word"
      }
    }
  }
}

} }

页面部分

页面文件 live-web 所需组件 node

页面安装 npm i / yarn install
运行 npm run dev / yarn dev