On Tue, Oct 7, 2008 at 12:56 AM, Chris Hostetter <[EMAIL PROTECTED]> wrote: > > : req.getSchema().getQueryAnalyzer(); > : > : I think it's in this analyzer that the undefined field error happens > : (because for instance the field 'foo' doesn't exists in the schema, > : and so it's impossible to find a specific analyzer to this field in > : the schema). > > Correct. > > : The strange thing is that any QueryParser (Lucene API) is supposed to > : raise a ParseException if anything wrong happens with the parsing with > : the parse(String) method. > : > : But here, it seems that the Analyzer from the schema (the one we get > : from getQueryAnalyzer()) is creating it's own error ( the undefined > : field one, instance of SolrException) and instead of propagating it to > : the QueryParser which could have a chance to propagate it as a > : standard ParseException, it seems it stops solr processing the query > : directly. > > Solr isn't doing anything magical here -- it's just throwing a > SolrException, which is a RuntimeExcepttion -- the Lucene > QueryParser.parse method only throws a ParseException in th event of > TooManyClauses, TokenMgrError, or an inner ParseException. >
Ook, I get it now. Runtime exceptions don't have to be checked at compile time, ( and couldn't be here since the Analyzer could be anything throwing anything). I'll catch that and deal with it then (Or is it bad programming ?) . Thanks for your help . -- Jerome Eteve. Chat with me live at http://www.eteve.net [EMAIL PROTECTED]