• 大小: 15.58M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-06-24
  • 语言: Java
  • 标签: 数据  上传  

资源简介


资源截图

代码片段和文件信息

package org.fetch.xiaohongshu;

import java.io.IOException;
import java.util.List;
import java.util.Map;

import com.alibaba.fastjson.JSONobject;

import okhttp3.MediaType;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.RequestBody;
import okhttp3.Response;

/**
 * es 索引操作,保存数据
 */
public class ESOptXHS {
private static final String ES_URL = System.getProperty(“ES_URL“ “http://127.0.0.1:9200“);

private static final MediaType JSON = MediaType.get(“application/json; charset=utf-8“);
private OkHttpClient client = new OkHttpClient();

private static final String userIndexName = “redbookuser“;
private static final String noteIndexName = “redbooknote“;

public String post(String url String json) throws IOException {
RequestBody body = RequestBody.create(JSON json

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2019-06-24 17:47  xiaohongshu\
     文件        8196  2019-06-24 17:47  xiaohongshu\.DS_Store
     目录           0  2019-06-24 17:49  __MACOSX\
     目录           0  2019-06-24 17:49  __MACOSX\xiaohongshu\
     文件         120  2019-06-24 17:47  __MACOSX\xiaohongshu\._.DS_Store
     目录           0  2019-06-24 17:37  xiaohongshu\bin\
     目录           0  2019-06-24 17:37  xiaohongshu\bin\org\
     目录           0  2019-06-24 17:37  xiaohongshu\bin\org\fetch\
     目录           0  2019-06-24 17:37  xiaohongshu\bin\org\fetch\xiaohongshu\
     文件         664  2019-04-09 16:03  xiaohongshu\bin\org\fetch\xiaohongshu\index-mapping-user.json
     文件        1112  2019-06-24 17:37  xiaohongshu\bin\org\fetch\xiaohongshu\UserImport.class
     文件         557  2019-04-10 11:09  xiaohongshu\bin\org\fetch\xiaohongshu\readme.txt
     文件         747  2019-04-09 16:21  xiaohongshu\bin\org\fetch\xiaohongshu\index-mapping-note.json
     文件        2445  2019-06-24 17:37  xiaohongshu\bin\org\fetch\xiaohongshu\ESOptXHS.class
     文件        1567  2019-06-24 17:37  xiaohongshu\bin\org\fetch\xiaohongshu\NoteImport.class
     目录           0  2019-06-24 17:43  xiaohongshu\dist\
     文件     6180960  2019-06-24 17:43  xiaohongshu\dist\redbookimport.jar
     目录           0  2019-06-24 17:43  xiaohongshu\shell\
     目录           0  2019-06-24 17:43  xiaohongshu\shell\xiaohongshu\
     文件    26388233  2019-05-14 16:25  xiaohongshu\shell\xiaohongshu\鎴戣鎴戞暟_灏忕孩涔︾瑪璁版暟鎹?csv
     文件         258  2019-04-10 11:16  xiaohongshu\shell\xiaohongshu\import_user.sh
     文件         258  2019-04-10 11:16  xiaohongshu\shell\xiaohongshu\import_node.sh
     文件         506  2019-06-24 17:44  xiaohongshu\shell\xiaohongshu\readme.txt
     文件      400364  2019-04-09 15:34  xiaohongshu\shell\xiaohongshu\鎴戣鎴戞暟_灏忕孩涔︾敤鎴蜂俊鎭?csv
     目录           0  2019-06-24 17:37  xiaohongshu\target\
     目录           0  2019-06-24 17:37  xiaohongshu\target\test-classes\
     目录           0  2019-06-24 17:48  xiaohongshu\target\classes\
     目录           0  2019-06-24 17:48  xiaohongshu\target\classes\org\
     文件        8196  2019-06-24 17:47  xiaohongshu\target\classes\org\.DS_Store
     目录           0  2019-06-24 17:48  xiaohongshu\target\classes\org\fetch\
     目录           0  2019-06-24 17:48  xiaohongshu\target\classes\org\fetch\xiaohongshu\
............此处省略50个文件信息

评论

共有 条评论