Alan,
I believe the import module declaration on line 1 is missing an "at" clause.
This is legal XQuery, but its interpretation is implementation-defined.
When the location is empty, as in this case, MarkLogic Server interprets
the application server root as the module location. Since the server
root is generally a directory, the error message you saw below is the
usual result.
-- Mike
Alan Darnell wrote:
Chris,
When I run this:
import module namespace sdis = "http://www.marklogic.com/ps/versi/search-ui
"
sdis:params-to-query(<params><q>water</q><coll>rep:orca</coll></params>)
I get this error in CQ
SVC-FILOPN: File open error: open '/opt/MarkLogic/Modules/cora/': Is a
directory
query evaluated in odesi-dileshni at file:/opt/MarkLogic/Modules/cora/
Stack trace:
line 5:
3: import module namespace sdis = "http://www.marklogic.com/ps/versi/search-ui
"
4:
5: sdis:params-to-query(<params><q>water</q><coll>rep:orca</coll></
params>)
We've loaded the documents into directories that reflect the
collection names"
e.g. /odesi/xxxx.xml
is assigned to the "odesi" collection
and /cora/xxx.xml
is assigned to the "cora: collection.
Maybe that's our problem?
Alan
On Nov 20, 2008, at 8:47 PM, Christopher Welch wrote:
That is odd. Try running this in CQ:
(: import the search-ui module :)
sdis:params-to-query(<params><q>water</q><coll>rep:orca</coll></
params>)
This should return the appropriate search:search-criteria with set-id.
Here's what it returns when I run it (the version from
developer.marklogic.com.)
<search-criteria fast-pagination="true">
<term>
<text>water</text>
</term>
<collections>
<set-id>rep</set-id>
<value>orca</value>
</collections>
</search-criteria>
And you're very welcome.
Cheers!
Chris
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Alan
Darnell
Sent: Thursday, November 20, 2008 8:32 PM
To: General Mark Logic Developer Discussion
Subject: Re: [MarkLogic Dev General] lib-search and collections
Christopher,
This is the XML search object that is being generated after processing
the URL:
http://marklogic.scholarsportal.info:8016/odesi/search.xqy?q=water&field
=&coll=rep%3Acora
<search-criteria fast-pagination="true" allow-empty-terms="false"
xmlns="http://www.marklogic.com/ps/lib/lib-search">
<term>
<text>water</text>
</term>
<collections>
<search:value xmlns:search="http://www.marklogic.com/ps/lib/lib-
search">cora</search:value>
</collections>
</search-criteria>
But it isn't picking up the set-id value and so the results are coming
back as zero hits.
I wonder if I should be unquoting the value of the coll parameter
before passing it into build-query-element.
Despite this problem, thanks for all this lib-search and versi code --
we couldn't build the XQuery apps we have without it.
Alan
On Nov 20, 2008, at 7:15 PM, Christopher Welch wrote:
Hi Alan,
It looks like you are trying to use lib-search with the rapid
application demo? Is that true?
Are you also trying to generate facets on the two collections?
I would say you have right idea, in either case. I would configure
lib-search just as you said.
With that configuration, when the querystring has
"coll=repository:odesi" in it, the function build-query-element in
search-ui.xqy will generate the following collection criteria to
resolve
your query appropriately:
<search:collections>
<search:set-id>repository</search:set-id>
<search:value>odesi</search:value>
</search:collections>
Cheers!
Chris
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Alan
Darnell
Sent: Thursday, November 20, 2008 5:58 PM
To: General Mark Logic Developer Discussion
Subject: [MarkLogic Dev General] lib-search and collections
I'm having difficulty understanding the lib-search documentation on
how to incorporate collection limits into searches.
It looks like lib-search is looking for the parameter "coll" for
collection limits, but I can't figure out what the value should to
pair with coll.
For instance, say I have two collections defined as
http://scholarsportal.info/cora
http://scholarsportal.info/odesi
and I want to offer users the opportunity to limit a search to the
content of one or both of these collections. I've set up a radio
button control group with the name "coll" but I can't figure out what
the values should be associated with the radio buttons.
The example config file has a collections section like this:
<collection-sets>
<collection-set id="publication">
<base-uri>http://www.foo.com/collections/pubs/</base-uri>
</collection-set>
</collection-sets>
So do I need something like this:
<collection-sets>
<collection-set id="repository">
<base-uri>http://scholarsportal.info/</base-uri>
</collection>
</collection-sets>
And then should the coll parameter take a value something like
coll=repository:odesi
Or am I completely lost?
Thanks in advance.
Alan
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general