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.




Re: Changing the schema.xml

2006-12-06 Thread David Halsted

I think you have to reindex; new additions to your index will follow
the new schema but Solr doesn't reach in and reindex your old
information automatically.

Dave

On 12/6/06, Andrew Nagy <[EMAIL PROTECTED]> wrote:

What is necessary for the effects of changing the schema.xml to take
effect for all of my records?  I restarted tomcat, but it does not seem
that my changes have taken effect.

I wanted to change a full-text field from type:string to type:text to
allow for better searching, but do no see any differences when I make my
changes to the schema.xml.

Thanks!
Andrew



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:

  

-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.(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.(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)
>

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.(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.(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
com.caucho.se

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



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  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: New Feature: ${solr.home}/lib/ dir for "plugins"

2006-11-14 Thread David Halsted

Extremely cool.  This is going to be a big help for some things I'm
working on and I'm sure for others.  Many thanks!!

On 11/14/06, Chris Hostetter <[EMAIL PROTECTED]> wrote:


Hey folks, I just wanted to let you all know about a new feature just
committed yesterday (now available in the solr-2006-11-15 nightly build).

While Solr has always had some really handy hooks for loading your own
code to do analysis, request handlers, output writers, field types, cache
implementations, and all sorts of other goodies, It wasn't until I
started trying to document how to *use* custom code in various Servlet
Containers that I realized it was pretty much impossible unless you:

   a) repackaged the Solr WAR with your code inside.
   or  b) used Caucho Resin.

(guess which servlet container I've been using)

Which brings us to the new functionality: It's now possible to create a
"lib/"  directory inside of your Solr Home directory, and place JARs in
that lib directory containing custom code you'd like to use -- Solr will
look at JARs in this directory when resolving class references you may
have in your solrconfig.xml and schema.xml.

This has been tested in a variety of different servlet containers, and
seems to work fine -- but I'd like to request that anyone currently
"repacking" the solr.war to include any other code try using this new
functionality instead, and report any bugs you may encounter (along with
info about your OS, the Servlet Container you are using, the relevant
configuration files, etc...)

Repacking the solr.war to include your code will always be an option
available to Solr users who want a single WAR containing everything they
care about, but the goal of this new functionality is to make it easier to
use custom plugins without needing to jump through the repacking hoops.

More information about Plugins can be found on the wiki...
   http://wiki.apache.org/solr/SolrPlugins

More information about this feature can be found in Jira...
   http://issues.apache.org/jira/browse/SOLR-68


-Hoss




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




Tomcat setup question

2006-11-10 Thread David Halsted

I've just downloaded Solr to a Windows laptop and it runs fine using
Jetty in the example, but I'm having trouble getting it to run under
Tomcat.  I looked at the page on the Wiki and back through the mailing
archives, and tried two methods that seemed to work for other people:
dropping solr/example/solr directly under the Tomcat home, and copying
solr/example/solr to a separate directory and starting Tomcat from
there (after putting solr.war in webapps).  Neither works; the first
one throws a class not found, and the second gets me part of the admin
page.  In the logs, I get this:

Nov 10, 2006 8:17:51 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.RuntimeException: Can't find resource '' in classpath or
'solr/conf/', cwd=C:\tomcat_solr
...

How can I correct that error?  I found a post that says that the
problem is that the conf files can't be found, but I didn't find any
suggestions for correcting the issue.

I guess I'm going to try setting the Java system property in
admin.jsp.  However, it would also be useful if somebody could post
somewhere an example of the changes for the JNDI settings for Tomcat.
Not sure why I'm having so much trouble with it . . .

thanks,
Dave Halsted