You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by Yonik Seeley <yo...@lucidimagination.com> on 2009/10/20 23:13:22 UTC
clustering schema
So when I go to try the clustering example, I fire up the server, hit
it with the example on the Wiki
http://localhost:8983/solr/select?indent=on&q=*:*&rows=10&clustering=true
And... boom.
java.lang.NullPointerException
at org.apache.solr.schema.SortableIntField.write(SortableIntField.java:72)
at org.apache.solr.schema.SchemaField.write(SchemaField.java:108)
[...]
It's because a schema mismatch of course... I had already indexed data
using the normal schema, and now we're using a different schema/config
with the same data dir.
I imagine this will be a common mistake.
Should we try to do this like SolrCell... just make it a lazy handler
and reference the libs in solrconfig.xml? Oh wait... searchComponents
can't be lazy I don't think... darn.
I guess the only "fix" (it's not really a bug, just undesirable) is to
try and get the schemas closer together?
-Yonik
http://www.lucidimagination.com
Re: clustering schema
Posted by Chris Hostetter <ho...@fucit.org>.
: Should we try to do this like SolrCell... just make it a lazy handler
: and reference the libs in solrconfig.xml? Oh wait... searchComponents
: can't be lazy I don't think... darn.
what about using the ebale="tue" syntax noble added ... i'm pretty sure i
saw that that gets applied for any type of plugin. we could use teh <lib>
syntax to (try to) load the clustering jars, and then have a clustering
component disabled by default (using a system prop defaulted to "false")
even if hte clustering libs aren't downloaded, the example should still
load fine ... if people wnat to try the clustering demo, they have to
build the contrib (and download the jars) and then run something like...
cd example
java -Dsolr.enable.clustering=true -jar start.jar
...that should work right?
-Hoss
Re: clustering schema
Posted by Colin Hynes <co...@activema.com>.
Grant,
Subversion started supporting externals on single files with version
1.6, so depending on what's running you could do it.
On Oct 21, 2009, at 6:39 AM, Grant Ingersoll wrote:
>
> On Oct 20, 2009, at 7:52 PM, Yonik Seeley wrote:
>
>> Actually just copying the example schema to contrib seemed to work
>> fine... those should probably be kept in alignment regardless of if
>> we
>> decide to do something different about the data directory.
>>
>
> Then maybe we should use an svn:external? Except, I don't know if
> that works on a single file.
>
>
Active Media Architects, Inc.
World Class Design, Programming & Strategy - Since 1998
http://www.activema.com
1-888-392-4567 toll free
1-586-445-1000 local
1-586-445-2247 fax
Re: clustering schema
Posted by Grant Ingersoll <gs...@apache.org>.
On Oct 20, 2009, at 7:52 PM, Yonik Seeley wrote:
> Actually just copying the example schema to contrib seemed to work
> fine... those should probably be kept in alignment regardless of if we
> decide to do something different about the data directory.
>
Then maybe we should use an svn:external? Except, I don't know if
that works on a single file.
Re: clustering schema
Posted by Yonik Seeley <yo...@lucidimagination.com>.
Actually just copying the example schema to contrib seemed to work
fine... those should probably be kept in alignment regardless of if we
decide to do something different about the data directory.
-Yonik
http://www.lucidimagination.com
Re: clustering schema
Posted by Yonik Seeley <yo...@lucidimagination.com>.
On Tue, Oct 20, 2009 at 5:31 PM, Grant Ingersoll <gs...@apache.org> wrote:
> Can't we set up the clustering solrconfig to have a different data directory
> and remove the default of ./solr/data? I get caught on this gotcha in a
> lot of places these days b/c I am often trying out lots of different
> configs.
We could, but that has it's own downsides... like creating lucene
indexes in various places in source directories like contrib.
-Yonik
http://www.lucidimagination.com
> On Oct 20, 2009, at 5:13 PM, Yonik Seeley wrote:
>
>> So when I go to try the clustering example, I fire up the server, hit
>> it with the example on the Wiki
>>
>> http://localhost:8983/solr/select?indent=on&q=*:*&rows=10&clustering=true
>>
>> And... boom.
>>
>> java.lang.NullPointerException
>> at
>> org.apache.solr.schema.SortableIntField.write(SortableIntField.java:72)
>> at org.apache.solr.schema.SchemaField.write(SchemaField.java:108)
>> [...]
>>
>> It's because a schema mismatch of course... I had already indexed data
>> using the normal schema, and now we're using a different schema/config
>> with the same data dir.
>> I imagine this will be a common mistake.
>>
>> Should we try to do this like SolrCell... just make it a lazy handler
>> and reference the libs in solrconfig.xml? Oh wait... searchComponents
>> can't be lazy I don't think... darn.
>> I guess the only "fix" (it's not really a bug, just undesirable) is to
>> try and get the schemas closer together?
>>
>> -Yonik
>> http://www.lucidimagination.com
>
> --------------------------
> Grant Ingersoll
> http://www.lucidimagination.com/
>
> Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids) using
> Solr/Lucene:
> http://www.lucidimagination.com/search
>
>
Re: clustering schema
Posted by Grant Ingersoll <gs...@apache.org>.
Can't we set up the clustering solrconfig to have a different data
directory and remove the default of ./solr/data? I get caught on
this gotcha in a lot of places these days b/c I am often trying out
lots of different configs.
On Oct 20, 2009, at 5:13 PM, Yonik Seeley wrote:
> So when I go to try the clustering example, I fire up the server, hit
> it with the example on the Wiki
>
> http://localhost:8983/solr/select?indent=on&q=*:*&rows=10&clustering=true
>
> And... boom.
>
> java.lang.NullPointerException
> at org.apache.solr.schema.SortableIntField.write
> (SortableIntField.java:72)
> at org.apache.solr.schema.SchemaField.write(SchemaField.java:108)
> [...]
>
> It's because a schema mismatch of course... I had already indexed data
> using the normal schema, and now we're using a different schema/config
> with the same data dir.
> I imagine this will be a common mistake.
>
> Should we try to do this like SolrCell... just make it a lazy handler
> and reference the libs in solrconfig.xml? Oh wait... searchComponents
> can't be lazy I don't think... darn.
> I guess the only "fix" (it's not really a bug, just undesirable) is to
> try and get the schemas closer together?
>
> -Yonik
> http://www.lucidimagination.com
--------------------------
Grant Ingersoll
http://www.lucidimagination.com/
Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids)
using Solr/Lucene:
http://www.lucidimagination.com/search