Re: [bdbxml] How to check for substring without specifying any particular node
John Snelson <[email protected]> Fri, 02 Sep 2005 11:45:12 +0100
| Newsgroups | gmane.comp.db.dbxml.general |
|---|---|
| Message-ID | <[email protected]> |
Manish Rai Jain wrote:
> I am putting up a default index like this:
> Default Index: node-element-substring-string node-element-equality-string
>
> Now, I want to query the container, so that I ONLY specify the value and
> not specify the node. So, that way, I am basically checking out for any
> available text which matches this string.
> But, using the dbxml shell, I have to specify the node name; otherwise,
> it doesn't retrieve any docs.
> Is it possible to retrieve docs in the above mentioned scenario? Or, any
> otherway to do so?
It is possible to write an XQuery that will accomplish this:
collection()//*[contains("foo", .)]
However, this could be slow, as the query planner will not be able to
use your index for it. Unfortunately, this is simply not a scenario that
DB XML has been optimised for.
We are considering implement XQuery Full-Text support in the future -
which will allow you to do this kind of query. However this is a major
undertaking, and would not be completed any time soon.
John
--
John Snelson, Berkeley DB XML Engineer
Sleepycat Software, Inc
http://www.sleepycat.com
Contracted to Sleepycat through Parthenon Computing Ltd
http://blog.parthcomp.com/dbxml
------------------------------------------
To remove yourself from this list, send an
email to [email protected]