Update of /cvsroot/monetdb/pathfinder/modules/pftijah
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv26715
Modified Files:
nexi.c pftijah.mx serialize_pftijah.mx
Log Message:
- create recursive tag detection qenv.
Index: serialize_pftijah.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/modules/pftijah/serialize_pftijah.mx,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- serialize_pftijah.mx 12 Jun 2007 17:35:58 -0000 1.50
+++ serialize_pftijah.mx 15 Jun 2007 07:00:42 -0000 1.51
@@ -219,11 +219,12 @@
*/
BAT* b_selectTags; /* [void,str] BAT containing select tags */
int selTagDepth; /* current selection tag depth, 0 = skip */
- /* The tagStack[] contains the starting Tijah oid of an element
+ /* The tagStartStack[] contains the starting Tijah oid of an element
* and is used to compute the size of an element in the Tijah
* pre-post-plane.
*/
- oid tagStack[MAXTAGDEPTH];
+ oid tagStartStack[MAXTAGDEPTH];
+ int tagOidStack[MAXTAGDEPTH];
int tagStackPtr;
/* */
int preExpansion; /* estimation for #TijahPre/PfPre */
@@ -236,18 +237,19 @@
#define DOEMIT(TJCTX) ((TJCTX)->selTagDepth)
static INLINE int
-tj_pushTag(tjCtx* tjctx, oid start) {
+tj_pushTag(tjCtx* tjctx, oid start, oid tagoid) {
if ( tjctx->tagStackPtr > MAXTAGDEPTH ) {
GDKerror("tj_pushTag: MAXTAGDEPTH exceeded.\n");
return -1;
}
- tjctx->tagStack[tjctx->tagStackPtr++] = start;
+ tjctx->tagOidStack[tjctx->tagStackPtr] = (int)tagoid;
+ tjctx->tagStartStack[tjctx->tagStackPtr++] = start;
return 1;
}
INLINE static oid
tj_popTag(tjCtx* tjctx) {
- return tjctx->tagStack[--tjctx->tagStackPtr];
+ return tjctx->tagStartStack[--tjctx->tagStackPtr];
}
/************************************************
@@ -784,7 +786,7 @@
if ( (tjPre = tj_newPre(tjctx) ) == oid_nil )
return 0;
dbat_set_oid(&tjctx->dbat_collPre, tjPre, termOid);
- if ( tj_pushTag(tjctx,tjPre) < 0 ) return 0;
+ if ( tj_pushTag(tjctx,tjPre,termOid) < 0 ) return 0;
if ( !BUNins(tjctx->b_collPfPre, &tjPre, &pre, FALSE) ) return 0;
#else
(void) pre;
@@ -868,7 +870,7 @@
if ( (tjPre = tj_newPre(tjctx) ) == oid_nil )
return 0;
dbat_set_oid(&tjctx->dbat_collPre, tjPre, termOid);
- if ( tj_pushTag(tjctx,tjPre) < 0 ) return 0;
+ if ( tj_pushTag(tjctx,tjPre,termOid) < 0 ) return 0;
#ifdef TJ_TRACE
if ( TJ_TRACE ) stream_printf(GDKout,"C[%s]:startElement: \"%s\",
termoid=%d, Tijah pre#=%d, Pathfinder
pre#=%d\n",tjctx->name,name,termOid,tjPre,pre);
#endif
Index: nexi.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/modules/pftijah/nexi.c,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -d -r1.66 -r1.67
--- nexi.c 14 Jun 2007 14:25:00 -0000 1.66
+++ nexi.c 15 Jun 2007 07:00:41 -0000 1.67
@@ -508,6 +508,7 @@
MILPRINTF(MILOUT,
"modify_qenv(qenv,QENV_FTIBGNAME,\"%s\");\n",parserCtx->collection);
MILPRINTF(MILOUT,
"modify_qenv(qenv,QENV_SCOREBASE,\"%s\");\n",qenv_scorebase);
MILPRINTF(MILOUT,
"modify_qenv(qenv,QENV_C_LAMBDA,\"%s\");\n",qenv_c_lambda);
+ MILPRINTF(MILOUT, "modify_qenv(qenv,QENV_RECURSIVE_TAGS,\"%s\");\n","0");
// Prepend some variables to the MIL code.
if ( qenv_prox_val ) {
MILPRINTF(MILOUT,
"modify_qenv(qenv,QENV_TERM_PROXIMITY,\"%s\");\n",qenv_prox_val);
Index: pftijah.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/modules/pftijah/pftijah.mx,v
retrieving revision 1.143
retrieving revision 1.144
diff -u -d -r1.143 -r1.144
--- pftijah.mx 14 Jun 2007 14:25:00 -0000 1.143
+++ pftijah.mx 15 Jun 2007 07:00:42 -0000 1.144
@@ -225,6 +225,7 @@
const QENV_C_LAMBDA := [EMAIL PROTECTED];
const QENV_TERM_PROXIMITY := [EMAIL PROTECTED];
const QENV_FEEDBACK_DOCS := [EMAIL PROTECTED];
+const QENV_RECURSIVE_TAGS := [EMAIL PROTECTED];
# create a query environment bat
PROC create_qenv() : BAT[oid,str]
-------------------------------------------------------------------------
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