Update of /cvsroot/monetdb/pathfinder/modules/pftijah
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv28896

Modified Files:
        pftijah.mx 
Log Message:
* update tijah:ft-index-info()
  1) does not crash anymore when pftijah was never used
  2) add new "collections" attribute containing all to be shredded collections



Index: pftijah.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/modules/pftijah/pftijah.mx,v
retrieving revision 1.129
retrieving revision 1.130
diff -u -d -r1.129 -r1.130
--- pftijah.mx  30 May 2007 14:08:09 -0000      1.129
+++ pftijah.mx  30 May 2007 15:06:36 -0000      1.130
@@ -247,24 +247,39 @@
 {
     var chkbat;
 
+    var tjc;
+
+    if (view_bbp_name().reverse().exist("tj_collName")) {
+        tjc := bat("tj_collName");
+    } else {
+        tjc := new(oid,str);
+    }
+
     if ( all )
-        chkbat := bat("tj_collName");
+        chkbat := tjc;
     else 
         chkbat := ftiNames;
 
     var res := new(void,str).seqbase([EMAIL PROTECTED]);
     var stm := new(void,str).seqbase([EMAIL PROTECTED]);
     var tok := new(void,str).seqbase([EMAIL PROTECTED]);
-    var frg := new(void,str).seqbase([EMAIL PROTECTED]);
+    var col := new(void,str).seqbase([EMAIL PROTECTED]);
     [EMAIL PROTECTED]() {
-       if ( or(all,bat("tj_collName").reverse().exist($t)) ) {
+       if ( or(all,tjc.reverse().exist($t)) ) {
           res.append($t);
           stm.append(bat("tj_" + $t + "_param").find("stemmer"));
           tok.append(bat("tj_" + $t + "_param").find("tokenizer"));
-          frg.append(bat("tj_" + $t + "_param").find("fragmentSize"));
+         var as := "";
+         bat("tj_pfc_fti_dep").reverse().select($t)@batloop() {
+             if ( as = "" )
+                 as := $h;
+             else 
+                 as := as + "," + $h;
+         }
+          col.append(as);
        }
     }
-    return xmltab4(ws, "ftindex", res, "stemmer", stm, "tokenizer", tok, 
"fragmentSize", frg);
+    return xmltab4(ws, "ftindex", res, "stemmer", stm, "tokenizer", tok, 
"collections", col);
 }
 
 #####################################################################
@@ -273,12 +288,6 @@
 #                                                                   #
 #####################################################################
 
-#####################################################################
-#                                                                   #
-# Start of the new implementation of the interfaces                 #
-#                                                                   #
-#####################################################################
-
 var verbose := false;
 
 const dflt_ft_index   := "DFLT_FT_INDEX";


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to