You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-users@xml.apache.org by Luca Cinquini <lu...@ucar.edu> on 2002/07/15 19:38:33 UTC

indexing, querying and namespaces

Hi,
    I am a relatively new user to Xindice and it seems I'm having 
problems with the combined use of indexing and namespaces. In short, it 
seems to me that indexes created on namespaced elements do not help at 
all in making the query any faster.

Here's the details.

o) I have created a collection of xml documents WITHOUT namespaces. I 
created an index on this collection with:

xindiceadmin ai -c /db/esg/CCSM/all2 -n vnidx -p 'variable@name'

and then when I issue a query of the form:

xindice xpath -c /db/esg/CCSM/all2 -q '/netcdf/variable[@name="z_t"]'

the results in returned within approximately one second. So far so good.

o) Then I created a collection of xml documents that use the namespace 
http://www.ucar.edu/schemas/netcdf .
I created an index on this collection with the command:

xindiceadmin ai -c /db/esg/CCSM/all -n vnidx -p  \ 
'[http://www.ucar.edu/schemas/netcdf]variable@[http://www.ucar.edu/schemas/netcdf]name'

(as the instructions on the web seem to suggest),
then I issued my queries:

  * xindice xpath -c /db/esg/CCSM/all -s 
"nc=http://www.ucar.edu/schemas/netcdf" -q 
'/nc:netcdf/nc:variable[@name="z_t"]'
returns results after a long time (40-50 seconds), as if the indexer did 
not exist

  *  xindice xpath -c /db/esg/CCSM/all -q 
'/[http://www.ucar.edu/schemas/netcdf]netcdf/[http://www.ucar.edu/schemas/netcdf]variable[@[http://www.ucar.edu/schemas/netcdf]name="z_t"]'
does not return anything, and the same is true for the queries:
  * xindice xpath -c /db/esg/CCSM/all -s 
"nc=http://www.ucar.edu/schemas/netcdf" -q 
'/nc:netcdf/nc:variable[@nc:name="z_t"]'
  * xindice xpath -c /db/esg/CCSM/all -q 
'/[http://www.ucar.edu/schemas/netcdf]netcdf/[http://www.ucar.edu/schemas/netcdf]variable[@name="z_t"]'


Thanks in advance for any help,

Luca

P.S. I did populate the database after I created the indexes...




xupdate by local characters

Posted by zhang min <ch...@ulis.ac.jp>.
Hello:

i try to use xupdate command with xindice. the program is the same as that
provided  in
http://xml.apache.org/xindice/DevelopersGuide.html

when i used update string in english characters as fellow it worked very
fine.
<xupdate:modifications version="1.0"
            xmlns:xupdate="http://www.xmldb.org/xupdate">
  <xupdate:update select="/student/grad_student[name='nakata']/area" >
       football
  </xupdate:update>
</xupdate:modifications>

but when changed the string 'football' into Japanese characters encoded by
unicode or EUC-JP.
i get this result:
org.omg.CORBA.DATA_CONVERSION:   minor code: 1398079494  completed: No
        at
com.sun.corba.se.internal.iiop.CDROutputStream.write_string(CDROutputStream.
java:386)
        at
org.apache.xindice.client.corba.db.ValueHelper.write(ValueHelper.java:82)
        at
org.apache.xindice.client.corba.db._CollectionStub.queryCollection(_Collecti
onStub.java:817)
        at
org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.updateResul
t(XUpdateQueryServiceImpl.java:165)
        at
org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.update(XUpd
ateQueryServiceImpl.java:185)
        at XUpdate.main(XUpdate.java:28)
XML:DB Exception occured 1

my system is RedHatLinux6.2 with jdk1.3.1 and xindice1.0.

Thanks for any help.

Zhangmin chaom@ulis.ac.jp



Re: indexing, querying and namespaces

Posted by Luca Cinquini <lu...@ucar.edu>.
Hi Jenya,
        thanks for the suggestion, I tried that too and it didn't work....
Luca

Jenya Strokin wrote:

>I may be wrong, but I think you shouldn't put URL before attribute name when
>you create index.
>It should be like this:
>xindiceadmin ai -c /db/esg/CCSM/all -n vnidx -p  \
>'[http://www.ucar.edu/schemas/netcdf]variable@name'
>
>
>-----Original Message-----
>From: Luca Cinquini [mailto:luca@ucar.edu]
>Sent: Monday, July 15, 2002 1:39 PM
>To: xindice-users@xml.apache.org
>Subject: indexing, querying and namespaces
>
>Hi,
>    I am a relatively new user to Xindice and it seems I'm having
>problems with the combined use of indexing and namespaces. In short, it
>seems to me that indexes created on namespaced elements do not help at
>all in making the query any faster.
>
>Here's the details.
>
>o) I have created a collection of xml documents WITHOUT namespaces. I
>created an index on this collection with:
>
>xindiceadmin ai -c /db/esg/CCSM/all2 -n vnidx -p 'variable@name'
>
>and then when I issue a query of the form:
>
>xindice xpath -c /db/esg/CCSM/all2 -q '/netcdf/variable[@name="z_t"]'
>
>the results in returned within approximately one second. So far so good.
>
>o) Then I created a collection of xml documents that use the namespace
>http://www.ucar.edu/schemas/netcdf .
>I created an index on this collection with the command:
>
>xindiceadmin ai -c /db/esg/CCSM/all -n vnidx -p  \
>'[http://www.ucar.edu/schemas/netcdf]variable@[http://www.ucar.edu/schemas/n
>etcdf]name'
>
>(as the instructions on the web seem to suggest),
>then I issued my queries:
>
>  * xindice xpath -c /db/esg/CCSM/all -s
>"nc=http://www.ucar.edu/schemas/netcdf" -q
>'/nc:netcdf/nc:variable[@name="z_t"]'
>returns results after a long time (40-50 seconds), as if the indexer did
>not exist
>
>  *  xindice xpath -c /db/esg/CCSM/all -q
>'/[http://www.ucar.edu/schemas/netcdf]netcdf/[http://www.ucar.edu/schemas/ne
>tcdf]variable[@[http://www.ucar.edu/schemas/netcdf]name="z_t"]'
>does not return anything, and the same is true for the queries:
>  * xindice xpath -c /db/esg/CCSM/all -s
>"nc=http://www.ucar.edu/schemas/netcdf" -q
>'/nc:netcdf/nc:variable[@nc:name="z_t"]'
>  * xindice xpath -c /db/esg/CCSM/all -q
>'/[http://www.ucar.edu/schemas/netcdf]netcdf/[http://www.ucar.edu/schemas/ne
>tcdf]variable[@name="z_t"]'
>
>
>Thanks in advance for any help,
>
>Luca
>
>P.S. I did populate the database after I created the indexes...
>
>
>
>-------------------------------------------
>Introducing NetZero Long Distance
>Unlimited Long Distance only $29.95/ month!
>Sign Up Today! www.netzerolongdistance.com
>



RE: indexing, querying and namespaces

Posted by Jenya Strokin <ev...@netzero.com>.
I may be wrong, but I think you shouldn't put URL before attribute name when
you create index.
It should be like this:
xindiceadmin ai -c /db/esg/CCSM/all -n vnidx -p  \
'[http://www.ucar.edu/schemas/netcdf]variable@name'


-----Original Message-----
From: Luca Cinquini [mailto:luca@ucar.edu]
Sent: Monday, July 15, 2002 1:39 PM
To: xindice-users@xml.apache.org
Subject: indexing, querying and namespaces

Hi,
    I am a relatively new user to Xindice and it seems I'm having
problems with the combined use of indexing and namespaces. In short, it
seems to me that indexes created on namespaced elements do not help at
all in making the query any faster.

Here's the details.

o) I have created a collection of xml documents WITHOUT namespaces. I
created an index on this collection with:

xindiceadmin ai -c /db/esg/CCSM/all2 -n vnidx -p 'variable@name'

and then when I issue a query of the form:

xindice xpath -c /db/esg/CCSM/all2 -q '/netcdf/variable[@name="z_t"]'

the results in returned within approximately one second. So far so good.

o) Then I created a collection of xml documents that use the namespace
http://www.ucar.edu/schemas/netcdf .
I created an index on this collection with the command:

xindiceadmin ai -c /db/esg/CCSM/all -n vnidx -p  \
'[http://www.ucar.edu/schemas/netcdf]variable@[http://www.ucar.edu/schemas/n
etcdf]name'

(as the instructions on the web seem to suggest),
then I issued my queries:

  * xindice xpath -c /db/esg/CCSM/all -s
"nc=http://www.ucar.edu/schemas/netcdf" -q
'/nc:netcdf/nc:variable[@name="z_t"]'
returns results after a long time (40-50 seconds), as if the indexer did
not exist

  *  xindice xpath -c /db/esg/CCSM/all -q
'/[http://www.ucar.edu/schemas/netcdf]netcdf/[http://www.ucar.edu/schemas/ne
tcdf]variable[@[http://www.ucar.edu/schemas/netcdf]name="z_t"]'
does not return anything, and the same is true for the queries:
  * xindice xpath -c /db/esg/CCSM/all -s
"nc=http://www.ucar.edu/schemas/netcdf" -q
'/nc:netcdf/nc:variable[@nc:name="z_t"]'
  * xindice xpath -c /db/esg/CCSM/all -q
'/[http://www.ucar.edu/schemas/netcdf]netcdf/[http://www.ucar.edu/schemas/ne
tcdf]variable[@name="z_t"]'


Thanks in advance for any help,

Luca

P.S. I did populate the database after I created the indexes...



-------------------------------------------
Introducing NetZero Long Distance
Unlimited Long Distance only $29.95/ month!
Sign Up Today! www.netzerolongdistance.com