Hi Todd,

Thank you very much.

Quoting Todd Byrne <[EMAIL PROTECTED]>:

>
>
>  From your xpath it looks like your searching for a cetain namespace.
> You can try this for a index pattern
> [EMAIL PROTECTED]://www.lqcd.org/ildg/QCDml/ensemble1.1]beta
>
> http://xml.apache.org/xindice/guide-administrator.html#Managing+Indexes
> is a good resource for indexes.


Actually "beta" is a tag name in the xml document stored in the xindice.
I tried
 xindice ai -c xmldb:xindice://localhost:18080/db3/ildg/cssm/mdc/ensembles -n
beta -p [http://www.lqcd.org/ildg/QCDml/ensemble1.1]beta
xindice: No match.

and

xindice ai -c xmldb:xindice://localhost:18080/db3/ildg/cssm/mdc/ensembles -n
beta -p [EMAIL PROTECTED]://www.lqcd.org/ildg/QCDml/ensemble1.1]beta
xindice: No match.

the above command was issured after I delete any beta index created before.

but this works:

 xindice ai -c xmldb:xindice://localhost:18080/db3/ildg/cssm/mdc/ensembles -n
beta -p beta
trying to register database
CREATED : beta

xindice li -c xmldb:xindice://localhost:18080/db3/ildg/cssm/mdc/ensembles
trying to register database
Indexes:

beta

The xml document I put in xindice is as:

Document 'su3b09000s16t32DBW2'

<?xml version="1.0"?> <markovChain
xmlns="http://www.lqcd.org/ildg/QCDml/ensemble1.1";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://www.lqcd.org/ildg/QCDml/ensemble1.1
http://www.ph.ed.ac.uk/ukqcd/community/the_grid/QCDml1.1/QCDml1.1Ensemble.xsd";>
<markovChainURI>www.sapac.edu.au/cssm/su3b09000s16t32DBW2</markovChainURI>
<management> <revisions>1</revisions> <collaboration>CSSM</collaboration>
<projectName>Wilson Quenched QCD Hadron Masses</projectName> <archiveHistory>
<elem> <revision>1</revision> <revisionAction>add</revisionAction>
<numberConfigs>51</numberConfigs> <participant> <name>Waseem Kamleh</name>
<institution>The University of Adelaide</institution> </participant>
<date>2005-05-03T16:18:43Z</date> </elem> </archiveHistory> </management>
<physics> <size> <elem> <name>X</name> <length>16</length> </elem> <elem>
<name>Y</name> <length>16</length> </elem> <elem> <name>Z</name>
<length>16</length> </elem> <elem> <name>T</name> <length>32</length> </elem>
</size> <action> <gluon> <DBW2GluonAction>
<glossary>www.lqcd.org/ildg/DBW2GluonAction.xml</glossary> <gluonField>
<gaugeGroup>SU(3)</gaugeGroup> <representation>fundamental</representation>
<boundaryCondition> <elem>periodic</elem> <elem>periodic</elem>
<elem>periodic</elem> <elem>periodic</elem> </boundaryCondition> </gluonField>
<couplings> <beta>9.0</beta> <c0>12.25520</c0> <c1>-1.4069</c1> <c2>0.0</c2>
</couplings> </DBW2GluonAction> </gluon> </action> </physics> <algorithm>
<name>GHMC</name> <glossary>www.ph.ed.ac.uk/ukqcd/community/GHMC.xml</glossary>
<reference>Phys.Rev.D65:054502,2002</reference> <exact>true</exact> <parameters>
<name>solverType</name> <value>BiCGStab</value> </parameters> </algorithm>
</markovChain>


In my program, I can query use:

//:beta[text()='12.5'] or something like that and get results as I expected,
because I set "service.setNamespace("",defaultnamespace)" when query collection.

but the above query string not worked for xindice command.
xindice command worked for:
xindice xpath -c xmldb:xindice://localhost:8080/db/demo -s
"br=http://www.lqcd.org/ildg/QCDml/ensemble1.1"; -q "//br:beta[text='12.5']

The exception my log file caught was happened before I add any index.

> > java.lang.NullPointerException
> >         at
> > org.apache.xindice.core.indexer.IndexPattern.<init>(IndexPattern.java:57)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.queryComparison(XPathQueryResolver.java\
> > :1090)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evalValComparison(XPathQueryResolver.ja\
> > va:521)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:296)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:284)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evalAxis(XPathQueryResolver.java:707)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:341)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evalLocationPath(XPathQueryResolver.jav\
> > a:376)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:279)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evalSetComparison(XPathQueryResolver.ja\
> > va:449)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:288)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:284)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evalAxis(XPathQueryResolver.java:707)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:341)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evalLocationPath(XPathQueryResolver.jav\
> > a:376)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:279)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:284)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evalAxis(XPathQueryResolver.java:707)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:341)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evalLocationPath(XPathQueryResolver.jav\
> > a:376)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:279)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:284)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.execute(XPathQueryResolver.java:208)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver.query(XPathQueryResolver.java:131)
> >  at org.apache.xindice.core.query.QueryEngine.query(QueryEngine.java:122)
> >         at
> > org.apache.xindice.core.Collection.queryCollection(Collection.java:1217)
> >         at
> org.apache.xindice.server.rpc.messages.Query.execute(Query.java:60)
> >         at
> >
>
org.apache.xindice.server.rpc.RPCMessageInterface.run(RPCMessageInterface.java:48)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >         at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >         at
> >
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >         at java.lang.reflect.Method.invoke(Method.java:585)
> >         at org.apache.xmlrpc.Invoker.execute(XmlRpcServer.java)
> >         at
> > org.apache.xmlrpc.XmlRpcServer$Worker.executeInternal(XmlRpcServer.java)
> >         at org.apache.xmlrpc.XmlRpcServer$Worker.execute(XmlRpcServer.java)
> >         at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java)
> >         at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java)
> >         at
> > org.apache.xindice.server.XindiceServlet.doPost(XindiceServlet.java:90)
> >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >         at
> >
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
> >         at
> >
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
> > at
> >
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
> >         at
> >
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
> >         at
> >
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.\
> > java:643)
> >         at
> > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> >         at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> >         at
> >
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> >         at
> >
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.\
> > java:643)
> >         at
> > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> >         at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> >         at
> > org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2422)
> >         at
> >
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
> >         at
> >
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.\
> > java:643)
> >         at
> >
>
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
> >         at
> >
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.\
> > java:641)
> >         at
> >
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:163)
> > at
> >
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.\
> > java:641)
> >         at
> > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> >         at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> >         at
> >
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
> >         at
> >
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.\
> > java:643)
> >         at
> > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> >         at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> >         at
> > org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199)
> >         at
> > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
> >         at
> >
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.ja\
> > va:700)
> >         at
> > org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)
> >         at
> >
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
> >         at java.lang.Thread.run(Thread.java:595)

This seems has some relation with index.

All query are successed even there are exceptions as above. The only problem is
no gained on query speed after index or the problem to create index with
namespace.

I wonder if it caused the index not worked?


Thanks,

qunfang zhang







Reply via email to