Re: Seeking FAQs

2007-01-06 Thread David Halsted

I wonder what would happen if we used a clustering engine like Carrot
to categorize either the e-mails in the archive or the results of
searches against them?  Perhaps we'd find some candidates for the FAQ
that way.

Dave

On 1/5/07, Chris Hostetter [EMAIL PROTECTED] wrote:


Hey everybody,

I was lookin at the FAQ today, and I realized it hasn't really changed
much in the past year ... in fact, only two people besides myself have
added questions (thanks Thorsten and Darren) in the entire time Solr
has been in incubation -- which is not to say that Erik and Respaldo's
efforts to fix my typo's aren't equally helpful :)

http://wiki.apache.org/solr/FAQ

In my experience, FAQs are one of the few pieces of documentation that are
really hard for developers to write, because we are so use to dealing with
the systems we work on, we don't allways notice when a question has been
asked more then once or twice (unless it gets asked over and over and
*over*).  The best source of FAQ updates tend to come from users who have
a question, and either find the answer in the mailing list archives, or
notice the same question asked by someone else later.

So If there are any gotchas you remember having when you first started
using Solr, or questions you've noticed asked more then once please feel
free to add them to the wiki.  The Convention is to only add a question if
you're also adding an answer, but even if you don't think a satisfactory
answer has ever been given, or you're not sure how to best summarize
multiple answers given in the past, just including links to
instances in the mailing list archives where the question was asked is
helpful -- both in the short term as pointers for people looking for help,
and in the long term as starter points for people who want to flesh out a
detailed answer.

Thanks in advance for anyone who helps contribute to the FAQ!


PS: Don't be shy about contributing to any of the other Wiki documentation
that you think are lacking, that's why it's a wiki.




Resin error question

2006-12-05 Thread David Halsted

I'm trying to get Solr running with Resin on a hosted site and I'm
having a problem in the initialization sequence.  I get the stack
trace below.  I had a look at the mailing list archives  and this kind
of error seems to be caused mostly when the config files can't be
seen, but it looks as though they can be in this case.  Any ideas?  Is
it seeing the XML but not parsing it correctly?Both solrconfig.xml
and schema.xml appear to be valid, at least.

Thanks,
Dave Halsted

[02:30:31.445]Loaded SolrConfig: solrconfig.xml
[02:30:31.613]java.lang.ExceptionInInitializerError
[02:30:31.613]  at org.apache.solr.core.SolrCore.clinit(SolrCore.java:71)
[02:30:31.613]  at org.apache.solr.servlet.SolrServlet.init(SolrServlet.java:71)
[02:30:31.613]  at javax.servlet.GenericServlet.init(GenericServlet.java:69)
[02:30:31.613]  at
com.caucho.server.dispatch.ServletConfigImpl.createServlet(ServletConfigImpl.java:599)
[02:30:31.613]  at
com.caucho.server.dispatch.ServletManager.init(ServletManager.java:152)
[02:30:31.613]  at
com.caucho.server.webapp.Application.start(Application.java:1546)
[02:30:31.613]  at
com.caucho.server.deploy.DeployController.startImpl(DeployController.java:563)
[02:30:31.613]  at
com.caucho.server.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:72)
[02:30:31.613]  at
com.caucho.server.deploy.DeployController.startOnInit(DeployController.java:451)
[02:30:31.613]  at
com.caucho.server.deploy.DeployContainer.start(DeployContainer.java:157)
[02:30:31.613]  at
com.caucho.server.webapp.ApplicationContainer.start(ApplicationContainer.java:610)
[02:30:31.613]  at com.caucho.server.host.Host.start(Host.java:385)
[02:30:31.613]  at
com.caucho.server.deploy.DeployController.startImpl(DeployController.java:563)
[02:30:31.613]  at
com.caucho.server.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:72)
[02:30:31.613]  at
com.caucho.server.deploy.DeployController.startOnInit(DeployController.java:451)
[02:30:31.613]  at
com.caucho.server.deploy.DeployContainer.start(DeployContainer.java:157)
[02:30:31.613]  at
com.caucho.server.host.HostContainer.start(HostContainer.java:468)
[02:30:31.613]  at
com.caucho.server.resin.ServletServer.start(ServletServer.java:934)
[02:30:31.613]  at
com.caucho.server.deploy.DeployController.startImpl(DeployController.java:563)
[02:30:31.613]  at
com.caucho.server.deploy.AbstractDeployControllerStrategy.start(AbstractDeployControllerStrategy.java:56)
[02:30:31.613]  at
com.caucho.server.deploy.DeployController.start(DeployController.java:459)
[02:30:31.613]  at
com.caucho.server.resin.ResinServer.start(ResinServer.java:465)
[02:30:31.613]  at com.caucho.server.resin.Resin.init(Resin.java)
[02:30:31.613]  at com.caucho.server.resin.Resin.main(Resin.java:612)
[02:30:31.613]Caused by: java.lang.UnsupportedOperationException
[02:30:31.613]  at
com.caucho.xml.QAbstractNode.getTextContent(QAbstractNode.java:355)
[02:30:31.613]  at org.apache.solr.core.Config.getVal(Config.java:123)
[02:30:31.613]  at org.apache.solr.core.Config.getBool(Config.java:160)
[02:30:31.613]  at
org.apache.solr.update.SolrIndexConfig.clinit(SolrIndexConfig.java:35)
[02:30:31.613]  ... 24 more
[02:30:31.616]javax.servlet.ServletException:
java.lang.ExceptionInInitializerError
[02:30:31.616]  at
com.caucho.server.dispatch.ServletConfigImpl.createServlet(ServletConfigImpl.java:631)
[02:30:31.616]  at
com.caucho.server.dispatch.ServletManager.init(ServletManager.java:152)
[02:30:31.616]  at
com.caucho.server.webapp.Application.start(Application.java:1546)
[02:30:31.616]  at
com.caucho.server.deploy.DeployController.startImpl(DeployController.java:563)
[02:30:31.616]  at
com.caucho.server.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:72)
[02:30:31.616]  at
com.caucho.server.deploy.DeployController.startOnInit(DeployController.java:451)
[02:30:31.616]  at
com.caucho.server.deploy.DeployContainer.start(DeployContainer.java:157)
[02:30:31.616]  at
com.caucho.server.webapp.ApplicationContainer.start(ApplicationContainer.java:610)
[02:30:31.616]  at com.caucho.server.host.Host.start(Host.java:385)
[02:30:31.616]  at
com.caucho.server.deploy.DeployController.startImpl(DeployController.java:563)
[02:30:31.616]  at
com.caucho.server.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:72)
[02:30:31.616]  at
com.caucho.server.deploy.DeployController.startOnInit(DeployController.java:451)
[02:30:31.616]  at
com.caucho.server.deploy.DeployContainer.start(DeployContainer.java:157)
[02:30:31.616]  at
com.caucho.server.host.HostContainer.start(HostContainer.java:468)
[02:30:31.616]  at
com.caucho.server.resin.ServletServer.start(ServletServer.java:934)
[02:30:31.616]  at
com.caucho.server.deploy.DeployController.startImpl(DeployController.java:563)
[02:30:31.616]  at
com.caucho.server.deploy.AbstractDeployControllerStrategy.start(AbstractDeployControllerStrategy.java:56)
[02:30:31.616]  at

Re: Resin error question

2006-12-05 Thread David Halsted

Great, Yonik -- I was hoping somebody would have seen it before (and I
didn't think to look in web.xml!).  I thought it would be easier to
uncomment than to get the host to upgrade, so I did and presto -- no
more errors.

Thanks much,
Dave

On 12/5/06, Yonik Seeley [EMAIL PROTECTED] wrote:

I recognize this error:
[02:30:31.613]Caused by: java.lang.UnsupportedOperationException
[02:30:31.613]  at
com.caucho.xml.QAbstractNode.getTextContent(QAbstractNode.java:355)

It's caused by a resin bug in their xpath implementation.
I think it's fixed in their latest version, so the simplest solution
would be to upgrade resin.
Another workaround is currently commented out in solr's web.xml:

  !-- Uncomment if you are trying to use a Resin version before 3.0.19.
Their XML implementation isn't entirely compatible with Xerces.
Below are the implementations to use with Sun's JVM.
  system-property javax.xml.xpath.XPathFactory=
 com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl/
  system-property javax.xml.parsers.DocumentBuilderFactory=
 
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl/
  system-property javax.xml.parsers.SAXParserFactory=
 com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl/
   --

-Yonik

On 12/5/06, David Halsted [EMAIL PROTECTED] wrote:
 I'm trying to get Solr running with Resin on a hosted site and I'm
 having a problem in the initialization sequence.  I get the stack
 trace below.  I had a look at the mailing list archives  and this kind
 of error seems to be caused mostly when the config files can't be
 seen, but it looks as though they can be in this case.  Any ideas?  Is
 it seeing the XML but not parsing it correctly?Both solrconfig.xml
 and schema.xml appear to be valid, at least.

 Thanks,
 Dave Halsted

 [02:30:31.445]Loaded SolrConfig: solrconfig.xml
 [02:30:31.613]java.lang.ExceptionInInitializerError
 [02:30:31.613]  at org.apache.solr.core.SolrCore.clinit(SolrCore.java:71)
 [02:30:31.613]  at 
org.apache.solr.servlet.SolrServlet.init(SolrServlet.java:71)
 [02:30:31.613]  at javax.servlet.GenericServlet.init(GenericServlet.java:69)
 [02:30:31.613]  at
 
com.caucho.server.dispatch.ServletConfigImpl.createServlet(ServletConfigImpl.java:599)
 [02:30:31.613]  at
 com.caucho.server.dispatch.ServletManager.init(ServletManager.java:152)
 [02:30:31.613]  at
 com.caucho.server.webapp.Application.start(Application.java:1546)
 [02:30:31.613]  at
 com.caucho.server.deploy.DeployController.startImpl(DeployController.java:563)
 [02:30:31.613]  at
 
com.caucho.server.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:72)
 [02:30:31.613]  at
 
com.caucho.server.deploy.DeployController.startOnInit(DeployController.java:451)
 [02:30:31.613]  at
 com.caucho.server.deploy.DeployContainer.start(DeployContainer.java:157)
 [02:30:31.613]  at
 
com.caucho.server.webapp.ApplicationContainer.start(ApplicationContainer.java:610)
 [02:30:31.613]  at com.caucho.server.host.Host.start(Host.java:385)
 [02:30:31.613]  at
 com.caucho.server.deploy.DeployController.startImpl(DeployController.java:563)
 [02:30:31.613]  at
 
com.caucho.server.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:72)
 [02:30:31.613]  at
 
com.caucho.server.deploy.DeployController.startOnInit(DeployController.java:451)
 [02:30:31.613]  at
 com.caucho.server.deploy.DeployContainer.start(DeployContainer.java:157)
 [02:30:31.613]  at
 com.caucho.server.host.HostContainer.start(HostContainer.java:468)
 [02:30:31.613]  at
 com.caucho.server.resin.ServletServer.start(ServletServer.java:934)
 [02:30:31.613]  at
 com.caucho.server.deploy.DeployController.startImpl(DeployController.java:563)
 [02:30:31.613]  at
 
com.caucho.server.deploy.AbstractDeployControllerStrategy.start(AbstractDeployControllerStrategy.java:56)
 [02:30:31.613]  at
 com.caucho.server.deploy.DeployController.start(DeployController.java:459)
 [02:30:31.613]  at
 com.caucho.server.resin.ResinServer.start(ResinServer.java:465)
 [02:30:31.613]  at com.caucho.server.resin.Resin.init(Resin.java)
 [02:30:31.613]  at com.caucho.server.resin.Resin.main(Resin.java:612)
 [02:30:31.613]Caused by: java.lang.UnsupportedOperationException
 [02:30:31.613]  at
 com.caucho.xml.QAbstractNode.getTextContent(QAbstractNode.java:355)
 [02:30:31.613]  at org.apache.solr.core.Config.getVal(Config.java:123)
 [02:30:31.613]  at org.apache.solr.core.Config.getBool(Config.java:160)
 [02:30:31.613]  at
 org.apache.solr.update.SolrIndexConfig.clinit(SolrIndexConfig.java:35)
 [02:30:31.613]  ... 24 more
 [02:30:31.616]javax.servlet.ServletException:
 java.lang.ExceptionInInitializerError
 [02:30:31.616]  at
 
com.caucho.server.dispatch.ServletConfigImpl.createServlet(ServletConfigImpl.java:631)
 [02:30:31.616]  at
 com.caucho.server.dispatch.ServletManager.init(ServletManager.java:152)
 [02:30:31.616]  at
 com.caucho.server.webapp.Application.start(Application.java

Newbie question about highlighting

2006-11-26 Thread David Halsted

Please forgive if this question is already answered on the Wiki or in
the mailing list archives -- I had a look and didn't quite see it but
may have missed something.

Question is pretty simple; I'm just not sure how to merge highlighted
snippets back into a stored field.  For example, I have a stored field
containing a paragraph of three lines or so. I want display the
paragraph as a whole, with the found terms highlighted.   What I get
back from a Solr query is the paragraph in str tags in the main
results, and then a set of  snippets with highlights representing only
part of the original paragraph.  Do I have to search and find the
spots to reinsert the snippets so I get the highlighting in the
context of the original paragraph, or is there some easier way?

Thanks in advance,
Dave Halsted


Re: Newbie question about highlighting

2006-11-26 Thread David Halsted

Perfect -- I saw that but misunderstood it.  Thanks, Yonik.

Dave

On 11/26/06, Yonik Seeley [EMAIL PROTECTED] wrote:

On 11/26/06, David Halsted [EMAIL PROTECTED] wrote:
 Do I have to search and find the
 spots to reinsert the snippets so I get the highlighting in the
 context of the original paragraph, or is there some easier way?

Hi David,
I think hl.fragsize=0 might do what you want.
From http://wiki.apache.org/solr/HighlightingParameters:


hl.fragsize

The size, in characters, of fragments to consider for highlighting.
0 indicates that the whole field value should be used (no
fragmenting). This parameter accepts per-field overrides.

The default value is 100.


-Yonik



Re: Tomcat setup question

2006-11-10 Thread David Halsted

Thanks for all the help -- I got it figured out.  Turned out I created
a lot of my own problems (never mind how).  Once I undid my own damage
I was able to get it running with the JNDI configuration.  I never did
get the simpler approaches to work, though.

Dave

On 11/10/06, Chris Hostetter [EMAIL PROTECTED] wrote:


:  SEVERE: Servlet.service() for servlet jsp threw exception
:  java.lang.RuntimeException: Can't find resource '' in classpath or
:  'solr/conf/', cwd=C:\tomcat_solr
:  ...

It's pretty weird that it says: ...resource '' in... those quotes should
contain the name of hte resource it's trying to find, making that message
more clear would be a good idea, but i don't think it's the cause of your
problem (can you send us the rest of that stack trace)

One other thing you can do to verify that your Solr configs will be found
properly is to check the log messages of Tomcat when the server is first
started ... if you are expecting the CWD to be used as Solr Home you
should see messages like this...

INFO: JNDI not configured for Solr (NoInitialContextEx)
INFO: user.dir=/home/chrish/svn/solr/example
INFO: Solr home defaulted to 'solr/'
INFO: Loaded SolrConfig: solrconfig.xml

...if you set the solr.solr.home system property explicitly, you'll see
something like this...

INFO: JNDI not configured for Solr (NoInitialContextEx)
INFO: user.dir=/home/chrish/svn/solr/example
INFO: Solr home set to '/home/hossman/tmp/solr-home/' from system property 
solr.solr.home

...and if you use JNDI you should see something like this...

INFO: Solr home set to '/home/chrish/tmp/solr-plugins/solr-home/'
INFO: user.dir=/home/chrish/svn/solr/example

: For tomcat, you can also use a context fragment to point to the solr
: war and to the solr home.  See Configuring Solr Home with JNDI at
: http://wiki.apache.org/solr/SolrTomcat

that wiki also contains the commands neccessary for the shortest possible
Solr/Tomcat install you can do just to sanity check that there's nothing
really wonky with your tomcat installation (it was for unix, but the basic
idea should work for windows as well)



-Hoss