lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jed Reynolds <li...@benrey.is-a-geek.net>
Subject merely a suggestion: schema.xml validator or better schema validation logging
Date Fri, 02 Mar 2007 05:48:50 GMT
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

Mime
View raw message