Project

General

Profile

« Previous | Next » 

Revision 3253

Added by Jing Tao about 17 years ago

Fixed bug that search will get a error in adding relationship.

View differences:

DBQuery.java
592 592
            npstmt.execute();
593 593
            ResultSet btrs = npstmt.getResultSet();
594 594
            boolean hasBtRows = btrs.next();
595
            Hashtable list = new Hashtable();
595 596
            while (hasBtRows)
596 597
            {
597 598
               //there was a backtrackable document found
......
626 627
                if (docid_org == null)
627 628
                {
628 629
                   logMetacat.info("Docid_org was null.");
629
                   //continue;
630
                   hasBtRows = btrs.next();
631
                   continue;
630 632
                }
631 633
                docid = docid_org.trim();
634
                if (list.containsKey(docid))
635
                {
636
                	logMetacat.info("DocumentResultSet already has docid "+docid+" and skip it");
637
                    hasBtRows = btrs.next();
638
                    continue;
639
                }
632 640
                docname = xmldoc.getDocname();
633 641
                doctype = xmldoc.getDoctype();
634 642
                createDate = xmldoc.getCreateDate();
......
660 668
                // Store the document id and the root node id
661 669
                docListResult.addResultDocument(
662 670
                  new ResultDocument(docid, (String) document.toString()));
671
                list.put(docid, docid);
663 672
                currentIndex++;
664 673
                logMetacat.warn("$$$$$$$real result: " + docid);
665 674
                count++;
......
1128 1137
               rs = pstmt.getResultSet();
1129 1138
               double extendedQueryEnd = System.currentTimeMillis() / 1000;
1130 1139
               logMetacat.info(
1131
                   "Time for execute extended query: "
1140
                   "Time to execute extended query: "
1132 1141
                   + (extendedQueryEnd - extendedQueryStart));
1133 1142
               tableHasRows = rs.next();
1134 1143
               while (tableHasRows) {
......
1202 1211
               } //while
1203 1212
               double docListResultEnd = System.currentTimeMillis() / 1000;
1204 1213
               logMetacat.warn(
1205
                   "Time for prepare doclistresult after"
1206
                   + " execute extended query: "
1214
                   "Time for prepare ResultDocumentSet after"
1215
                   + " executing extended query: "
1207 1216
                   + (docListResultEnd - extendedQueryEnd));
1208 1217
           }
1209 1218

  

Also available in: Unified diff