Update of /cvsroot/monetdb/pathfinder/compiler/semantics
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv14738/compiler/semantics
Modified Files:
Tag: M5XQ
xquery_fo.c
Log Message:
propagated changes of Thursday Nov 05 2009 - Monday Nov 09 2009
from the development trunk to the M5XQ branch
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2009/11/05 - singhan: compiler/semantics/xquery_fo.c,1.190
XQuery full-text search support initial version!
This initial version provides support to
-ftcontains keyword,
e.g., for $f in doc("menu.xml")//food[./name ftcontains "Belgian Waffles"]
return $f
The above query will return all the food nodes that has some relevancy over
"Belgian Waffles"
-initial score variable support
e.g., for $f score $s in doc("menu.xml")//food[./name ftcontains "Belgian
Waffles"]
return $s
The above query will return the relevancy score of all the matched food
nodes, however since its an initial version, the support to this score variable
is very limited.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Index: xquery_fo.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/semantics/xquery_fo.c,v
retrieving revision 1.184.2.5
retrieving revision 1.184.2.6
diff -u -d -r1.184.2.5 -r1.184.2.6
--- xquery_fo.c 13 Oct 2009 14:52:06 -0000 1.184.2.5
+++ xquery_fo.c 9 Nov 2009 00:05:02 -0000 1.184.2.6
@@ -2868,7 +2868,7 @@
, /* tijah:create-ft-index() as docmgmt */
{ .ns = PFns_tijah, .loc = "create-ft-index",
.arity = 0, .sig_count = 1, .sigs = { {
- .ret_ty = PFty_docmgmt () } },
+ .ret_ty = PFty_docmgmt () } },
.alg = PFbui_manage_fti_c_xx }
, /* tijah:create-ft-index(string*) as docmgmt */
{ .ns = PFns_tijah, .loc = "create-ft-index",
@@ -3085,6 +3085,42 @@
.par_ty = (PFty_t[]) { PFty_xs_integer () },
.ret_ty = PFty_xs_integer () } } }
#endif
+
+#ifdef HAVE_PFTIJAH
+
+ /* . Full-text functions */
+ , /* fts:ftcontains (node, string) as boolean */
+ { .ns = PFns_fts, .loc = "ftcontains",
+ .arity = 2, .sig_count = 1, .sigs = { {
+ .par_ty = (PFty_t[]) { PFty_xs_anyNode (),
+ PFty_xs_string () },
+ .ret_ty = PFty_xs_boolean () } },
+ .alg = PFbui_tijah_ftfun_b_sxx }
+ , /* fts:ftcontains (node?, string?) as boolean? */
+ { .ns = PFns_fts, .loc = "ftcontains",
+ .arity = 2, .sig_count = 1, .sigs = { {
+ .par_ty = (PFty_t[]) { PFty_opt (PFty_xs_anyNode ()),
+ PFty_opt (PFty_xs_string ()) },
+ .ret_ty = PFty_opt (PFty_xs_boolean ()) } },
+ .alg = PFbui_tijah_ftfun_b_sxx }
+
+
+ , /* fts:score (boolean) as dbl */
+ { .ns = PFns_fts, .loc = "score",
+ .arity = 1, .sig_count = 1, .sigs = { {
+ .par_ty = (PFty_t[]) { PFty_item () },
+ .ret_ty = PFty_xs_double () } },
+ .alg = PFbui_tijah_ftfun_score }
+ , /* fts:score (boolean?) as dbl? */
+ { .ns = PFns_fts, .loc = "score",
+ .arity = 1, .sig_count = 1, .sigs = { {
+ .par_ty = (PFty_t[]) { PFty_opt (PFty_item ()) },
+ .ret_ty = PFty_opt (PFty_xs_double ()) } },
+ .alg = PFbui_tijah_ftfun_score }
+
+#endif
+
+
, { .loc = 0 }
};
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins