schema design question

2012-04-05 Thread N. Tucker
Apologies if this is a very straightforward schema design problem that
should be fairly obvious, but I'm not seeing a good way to do it.
Let's say I have an index that wants to model Albums and Tracks, and
they all have arbitrary tags attached to them (represented by
multivalue string type fields).  Tracks also have an album id field
which can be used to associate them with an album.  I'd like to
perform a query which shows both Track and Album results, but
suppresses Tracks that are associated with Albums in the result set.

I am tempted to use a "join" here, but I have reservations because it
is my understanding that joins cannot work across shards, and I'm not
sure it's a good idea to limit myself in that way if possible.  Any
suggestions?  Is there a standard solution to this type of problem
where you've got hierarchical items and you don't want children shown
in the same result as the parent?


solr analysis-extras configuration

2012-04-06 Thread N. Tucker
Hello, I'm running into an odd problem trying to use ICUTokenizer
under a solr installation running under tomcat on ubuntu.  It seems
that all the appropriate JAR files are loaded:

INFO: Adding 'file:/usr/share/solr/lib/lucene-stempel-3.5.0.jar' to classloader
INFO: Adding 'file:/usr/share/solr/lib/lucene-smartcn-3.5.0.jar' to classloader
INFO: Adding 'file:/usr/share/solr/lib/icu4j-4_8_1_1.jar' to classloader
INFO: Adding 'file:/usr/share/solr/lib/lucene-icu-3.5.0.jar' to classloader
INFO: Adding 'file:/usr/share/solr/lib/apache-solr-analysis-extras-3.5.0.jar'
to classloader
... but later: ...
SEVERE: java.lang.NoClassDefFoundError:
org/apache/lucene/analysis/icu/segmentation/ICUTokenizer

I'm not too clear on the correct way to add the contrib bits other
than copying them into the 'lib' directory under solrhome.  They are
obviously found there (and I have verified that ICUTokenizer is in
lucene-icu-3.5.0.jar), but there's still a problem loading the
ICUTokenizer class.  Any tips on troubleshooting this?  Are there more
depenencies that I'm unaware of?


Re: solr analysis-extras configuration

2012-04-06 Thread N. Tucker
Further info: I can make this work if I stay out of tomcat -- I
download a fresh solr binary distro, copy those five JARs from 'dist'
and 'contrib' into example/solr/lib/, copy my solrconfig.xml and
schema.xml, and run 'java -jar start.jar', and it works fine.  But
trying to add those same JARs to my tomcat instance's solrhome/lib
doesn't work.  Any ideas how to troubleshoot?


On Fri, Apr 6, 2012 at 12:15 PM, N. Tucker
 wrote:
> Hello, I'm running into an odd problem trying to use ICUTokenizer
> under a solr installation running under tomcat on ubuntu.  It seems
> that all the appropriate JAR files are loaded:
>
> INFO: Adding 'file:/usr/share/solr/lib/lucene-stempel-3.5.0.jar' to 
> classloader
> INFO: Adding 'file:/usr/share/solr/lib/lucene-smartcn-3.5.0.jar' to 
> classloader
> INFO: Adding 'file:/usr/share/solr/lib/icu4j-4_8_1_1.jar' to classloader
> INFO: Adding 'file:/usr/share/solr/lib/lucene-icu-3.5.0.jar' to classloader
> INFO: Adding 'file:/usr/share/solr/lib/apache-solr-analysis-extras-3.5.0.jar'
> to classloader
> ... but later: ...
> SEVERE: java.lang.NoClassDefFoundError:
> org/apache/lucene/analysis/icu/segmentation/ICUTokenizer
>
> I'm not too clear on the correct way to add the contrib bits other
> than copying them into the 'lib' directory under solrhome.  They are
> obviously found there (and I have verified that ICUTokenizer is in
> lucene-icu-3.5.0.jar), but there's still a problem loading the
> ICUTokenizer class.  Any tips on troubleshooting this?  Are there more
> depenencies that I'm unaware of?


Re: solr analysis-extras configuration

2012-04-10 Thread N. Tucker
I'm still not exactly clear on why this is the case, but the problem
turned out to be that the extra libs needed to be in my tomcat app's
WEB-INF/lib directory, rather than ${solrhome]/lib.  I don't really
understand the distinction between the two, especially since Solr was
reporting that it was loading the libs found in ${solrhome}/lib.

At any rate, problem solved.

On Mon, Apr 9, 2012 at 1:36 PM, Chris Hostetter
 wrote:
>
> : Further info: I can make this work if I stay out of tomcat -- I
> : download a fresh solr binary distro, copy those five JARs from 'dist'
> : and 'contrib' into example/solr/lib/, copy my solrconfig.xml and
> : schema.xml, and run 'java -jar start.jar', and it works fine.  But
> : trying to add those same JARs to my tomcat instance's solrhome/lib
> : doesn't work.  Any ideas how to troubleshoot?
>
> is there anything else about how you have tomicat+solr configured that
> might be causing tomcat to load *any* solr or lucene jars directly,
> instead of letting the solr.war file load them from your solr home dir?
> did you change anything about tomcat's classpath? did you copy any jars
> anywhere other then your solrhome/lib dir?
>
> these kinds of "classloader hell" errors can happen if a parent
> classloader has already loaded some class that depends on (or is depended
> on by) a another class loaded by the solr war.
>
>
> -Hoss