On Mon, Jul 27, 2009 at 03:02:31PM +0100, Roy Walter wrote:
Ying Zhang wrote:
On Mon, Jul 27, 2009 at 10:50:21AM +0100, Roy Walter wrote:
Ying Zhang wrote:
On Mon, Jul 27, 2009 at 09:45:34AM +0100, Roy Walter wrote:
Ying Zhang wrote:
On Fri, Jul 24, 2009 at 12:21:54PM +0100, Roy Walter wrote:
> Ying Zhang wrote: > > > >> Hello Roy, >> >> >> On Fri, Jul 24, 2009 at 09:41:45AM +0100, Roy Walter wrote: >> >> >> >> >>> Hi >>> >>> A couple of tijah related issues with query modules. >>> >>> 1. The following query when run from xrpc.html appears to ignore the >>> >>> >>> >>> >> Which xrpc.html do you exactly mean? Can you give its URL? >> >> For clarity, are you running the function tijahSearch remotely using the >> XRPC extension of MonetDB/XQuery? >> >> >> Regards, >> >> Jennie >> >> >> >> >> >>> $term argument and returns a very large result! >>> >>> module namespace tj = "tj"; >>> >>> declare function tj:tijahSearch($term as xs:string) as node()* >>> { >>> tijah:queryall("//speech[about(., $term)]") >>> }; >>> >>> 2. Running the above query sometimes produces the following error: >>> >>> !ERROR: interpret: no matching MIL operator to 'tj_query_handler(bit >>> BAT[void BAT], ... >>> >>> Thanks, >>> Roy >>> >>> ------------------------------------------------------------------------------ >>> _______________________________________________ >>> MonetDB-users mailing list >>> MonetDB-users@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/monetdb-users >>> >>> >>> >>> >> >> >> >> > OK, it's the file that comes with the distribution, i.e., > http://localhost:50001/export/xrpc.html > > I am just using the sample page to try out the xrpc functionality, so > everything is running locally. The following, related, non tijah query > works fine: > > module namespace search = "search"; > > declare function search:simpleSearch($term as xs:string) as node()* > { > doc("debates2006.xml")//speech[contains(., $term)] > }; > > > Hello Roy,
Basically, what XRPC does is wrapping the parameter value into a SOAP XRPC message, send the msg to your local Mserver, extra the parameter value, and use MonetDB/XQuery to execute the function. Your problem seems not XRPC related, als simpleSearch function works, i.e., XRPC is able to correct marshal and unmarshal function parameter/results.
To check this, you could execute your Tijah query without XRPC, by using e.g., mclient, to see if the problem remains. However, there is one important difference between executing the Tijah query via XRPC and via mclient: XRPC currently only works with the old frontend, executing your tijah function via XRPC is equivalent with executing it with 'mclient -lx -g' (note the extra '-g' option), while mclient by default uses the new algebra frontend. Latest improvements and bugfixes have only be done in the algebra frontend. If you encounter problems when executing tijah queries using the old frontend, it is possible that the problem has already been fixed in the algebra frontend, in this case you should use the (default) algebra frontend. (not XRPC related) Bugs in the old frontend will only be fixed if they also exist in the algebra frontend.
Regards,
Jennie
> Thanks, > Roy > > >
A related issue while following this through. When I execute my simpleSearch query (see above) from export/xrpc.html it works as expected. When I try to execute from within mclient I get an error:
xquery>import module namespace test = "search" at "http://localhost:50001/export /search.xq"; more>execute at {"localhost"} {test:simpleSearch("Heathrow")} more>^Z MAPI = monetdb@localhost:50000 QUERY = import module namespace test = "search" at "http://localhost:50001/expor t/search.xq"; ERROR = !ERROR: interpret: no matching MIL operator to 'reverse(void)'. !MAYBE YOU MEAN: ! reverse(BAT[any::1,any::2]) : BAT[any::2,any::1] !ERROR: interpret_params: sort(param 1): evaluation error. !ERROR: interpret_params: reverse(param 1): evaluation error. xquery>
What am I doing wrong?
Hello Roy,
I can't see a problem in your query directly. I need to reproduce the error to find out what has gone wrong here. Can I maybe have the document "debates2006.xml" you are using for this query?
Can you also give some information about: - which monetdb/xquery are you using? - how did you compile/install monet? - on which OS are you using monet (windows, linux, etc)? - is your OS a 32 or 64-bits system?
Regards,
Jennie
-- Roy
Hi Jennie
I can reproduce the problem with the simple document below ("debates2006.xml" is approx. 100MB).
I am using MonetDB/XQuery 0.30.2/MonetDB 4.30.2 on Windows XP SP3 (32-bit). I installed from the binary distribution.
<?xml version="1.0" standalone="yes"?> <proceedings> <speech speaker="Roy Walter"> <p>Wind farms at Heathrow are a good thing.</p> </speech> </proceedings>
Hi Roy,
By default, mclient uses the (new) albegra frontend, while xrpc only works with the old frontend. So to run xrpc query, you need to tell mclient to use the old frontend (please note the '-g' option):
$ mclient -lx -g xquery>import module namespace t="search" at "/tmp/search.xq"; execute at {"localhost"}{t:simpleSearch("Heathrow")} more><> <speech speaker="Roy Walter"> <p>Wind farms at Heathrow are a good thing.</p> </speech> xquery>\q
Regards,
Jennie
Ah sorry, you did mention that before and I had forgotten to try it. So, using the \g option I now get a result but it's flagged as an error:
xquery>import module namespace test="search" at "http://localhost:50001/export/s earch.xq"; more>execute at {"localhost"} {test:simpleSearch("Heathrow")} more>^Z MAPI = monetdb@localhost:50000 QUERY = import module namespace test="search" at "http://localhost:50001/export/ search.xq"; ERROR = !?=<speech speaker="Roy Walter"> <p>Wind farms at Heathrow are a good thing.</p> </speech> xquery>
Many thanks,
I ran your simpleSearch query on a windows vista 64 bits (can't get closer to your system), and unfortunately, it worked fine. Can you reproduce this problem? Would it help if you restart the server? Jennie
Roy