Re: add index to xindice1.1b4, need help

Qunfang Zhang <[email protected]>
Newsgroups gmane.text.xml.xindice.user
Message-ID <[email protected]>
Hi all,

Can someone help me to solve the urgent problems?

I use xindice1.1b4 on Linux, everything fine for searching. When I try to set
checkpoints in my program to trace the time spent during querying collection, I
happen recorded in my log file the exceptions as follow:
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 does not influence any normal queries. However, when I add index on the
query collection with pattern "beta", and query element "beta", it turns out no
speed gained at all.

- add index command:
xindice ai -c xmldb:xindice://localhost:8080/db/demo/ensembles -n beta -p beta
- My docment store in xindice collection with default namespace such as
xmlns="http://www.lqcd.org/ildg/QCDml/ensemble1.1"
- in my program I use to set the default namespace with following string:
service.setNamespace("","http://www.lqcd.org/ildg/QCDml/ensemble1.1");
- query string of "//:beta[text()='12.6']" then return what I expected.
- after I add index for "beta", the db/system/Sysconfig/database.xml has
correctly recorded it.

the only problem is index has no effect.

Any help will be very helpful!

Thanks,

qunfang zhang
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.