Hi Jed,

NullPointerException when adding a document w/o the uniqueKey field is
a known bug, and should be fixed shortly.

If the actual schema was null, then that was probably some problem
parsing the schema.
If that's the case, hopefully you saw an exception in the logs on startup?

Anyway, I agree that some config errors could be handled in a more
user-friendly manner, and it would be nice if config failures could
make it to the front-page admin screen or something.

-Yonik


On 3/2/07, Jed Reynolds <[EMAIL PROTECTED]> wrote:
First time user. Not interested in flamewar, just making a suggestion.

I just got Solr working with my own schema and it was only a little more
mysterious than I expected, having previously dealth with Nutch. Solr is
exactly what I wanted in terms of (theoretical) ease of configurability.

However, my first try at defining a schema.xml file was tough because my
only feedback for a long time was "NullPointerException" from SolrCore
when I was trying to add content. I deduce what was happening was when
SolrCore tried invoking methods on the schema instance, the schema
instance was null.

 From a design point of view, this could easily be modeled with the
NullObject pattern, and an InvalidSchema object could be substituted as
a default schema object. Method invocations to that schema would
appropriately log why the proper schema failed to validate and substantiate.

I'd think that since the capacity to define a schema via XML is so
attractively powerful, that providing feedback on bad schemata would
really speed deployment and adoption.  It turned out that I had
misspelled the unique key field reference. Silly, but can't be uncommon
for a first time user.

If there is already a method of pre-validating the schema, noting it on
the wiki would be really helpful.

So far, that has been my only hangup. This has been so much easier and
appropriate than Nutch I've been gung-ho all week setting this up. Thank
you!


Jed

Reply via email to