Examples of ChineseEntity


Examples of zh.solr.se.indexer.db.entity.ChineseEntity

                this.mapper = mapper;
        }

        public ChineseEntity parseDataModel(String jsonString)
                        throws Exception {
          ChineseEntity dataModel = null;
                try {
                        dataModel = this.mapper.readValue(jsonString, ChineseEntity.class);
                } catch (IOException e) {
                        throw new Exception("can't map json to java Obejct, check input json String : " + jsonString, e);
                }
View Full Code Here

Examples of zh.solr.se.indexer.db.entity.ChineseEntity

    if(super.dataType.equals(DataType.JSON)){
      JsonProcesser processer = new JsonProcesser(new ObjectMapper());
      BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(getSourceFile())));
      String line = null;
      while(null !=(line = br.readLine())){
        ChineseEntity entity = processer.parseDataModel(line.trim());
        // index entity
        SolrInputDocument solrDoc = toSolrDocument(entity);
        try {
          indexDocument(solrDoc);
          ++count;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.