Project

General

Profile

« Previous | Next » 

Revision 7888

Added by Jing Tao over 11 years ago

Fixed a bug that the missed id is not writtent to the file.

View differences:

metacat-index/src/test/java/edu/ucsb/nceas/metacat/index/SolrMetacatIdsComparatorIT.java
48 48
        boolean appending = true;
49 49
        if(metacatIds != null) {
50 50
            for(String id : metacatIds) {
51
            
51
                //String id = metacatIds.get(0);
52 52
                if(id != null && !id.trim().equals("")) {
53 53
                    SolrDoc doc = ResourceMapSubprocessor.getSolrDoc(id);
54 54
                    if(doc == null) {
55 55
                        List<String> line = new ArrayList<String>();
56
                        line.add(id);
56 57
                        FileUtils.writeLines(notInSolrFile, line, appending);
57
                    } /*else {
58
                      List<SolrElementField> list = doc.getFieldList();
59
                      if(list != null) {
60
                          for(SolrElementField element : list) {
61
                              System.out.println("name "+element.getName());
62
                              System.out.println("value "+element.getValue());
63
                          }
64
                      } else {
65
                          System.out.println("list is null");
66
                      }
67
                      //SolrElementField solrId = doc.getField("id");
68
                      //System.out.println("the value is "+solrId.getValue());
69
                    }*/
58
                    } 
70 59
                }
71 60
            }
72 61
        }

Also available in: Unified diff