Hello,

I've never used Solr before, but I believe that it will suit my current
needs with indexing information from a database.

I downloaded and extracted Solr 1.3 to play around with it. I've been
looking at the following tutorials:
http://www.ibm.com/developerworks/java/library/j-solr-update/index.html
http://www.ibm.com/developerworks/java/library/j-solr-update/index.html 
http://wiki.apache.org/solr/DataImportHandler
http://wiki.apache.org/solr/DataImportHandler 

There are a few things I don't understand. For example, the IBM article
sometimes refers to directories that aren't there, or a little different
from what I have in my extracted copy of Solr (ie
solr-dw/rss/conf/solrconfig.xml). I tried to follow the steps as best I can,
but as soon as I put the following in solrconfig.xml, the whole thing
breaks:

<requestHandler name="/dataimport"
  class="org.apache.solr.handler.dataimport.DataImportHandler">
<lst name="defaults">
  <str name="config">rss-data-config.xml</str>
</lst>
</requestHandler>

Obviously I replace with my own info...One thing I don't quite get is the
data-config.xml file. What exactly is it? I've seen examples of what it
contains but since I don't know enough, I couldn't really adjust it. In any
case, this is the error I get, which may be because of a misconfigured
data-config.xml...

org.apache.solr.handler.dataimport.DataImportHandlerException: Exception
occurred while initializing context at
org.apache.solr.handler.dataimport.DataImporter.loadDataConfig(DataImporter.java:165)
at
org.apache.solr.handler.dataimport.DataImporter.<init>(DataImporter.java:99)
at
org.apache.solr.handler.dataimport.DataImportHandler.inform(DataImportHandler.java:96)
at
org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:388)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:571) at
org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:122)
at
org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:69)
at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:221)
at
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:302)
at
org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:78)
at
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3635)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4222)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544) at
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:831) at
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:720) at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490) at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1150) at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022) at
org.apache.catalina.core.StandardHost.start(StandardHost.java:736) at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at
org.apache.catalina.core.StandardService.start(StandardService.java:448) at
org.apache.catalina.core.StandardServer.start(StandardServer.java:700) at
org.apache.catalina.startup.Catalina.start(Catalina.java:552) at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at
java.lang.reflect.Method.invoke(Unknown Source) at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295) at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433) Caused by:
org.xml.sax.SAXParseException: The element type "document" must be
terminated by the matching end-tag "</document>". at
com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown
Source) at
org.apache.solr.handler.dataimport.DataImporter.loadDataConfig(DataImporter.java:153)


It's unclear to me what I need to be using, as in what directories/files I
need to implement this. Can someone please point me in the right direction?

BTW, I'm using Tomcat 5.5 because the prepackaged Jetty simply doesn't work
for me. It shows that it "started" in the command line, but it hangs, and
doesn't actually work when I try to hit the Solr admin page (page not found
type error). Jetty itself does start but the project doesn't seem to
deploy...

I apologize for the long post and if I didn't provide as much information as
I should. Let me know if you need clarification with anything I said.

Thank you very much.
-- 
View this message in context: 
http://www.nabble.com/Using-Solr-to-index-a-database-tp23136944p23136944.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to