: I'll catch that and deal with it then (Or is it bad programming ?) .

that's a psuedo-religious question -- i will only say that many people 
recomend against using Exception catching to drive control flow, it's 
called an "Exception" because it's suppose to be the "Exception" to the 
norm ... if an large percentage of hte time these field names aren't going 
to exist in your schema, you should probably be checking for the 
non-existing field first.

Note that another way to approach this is to add a dynamicField that 
matches "*" (there's an example commented out in the example schema) and 
give it a fieldtype using a query Analyzer that does whatever you want 
your special analyzer to do in the event of non-existent field (probably 
just produce no tokens) ... the only downside to this approach is that you 
won't get any errors if you inadvertantly index a document with an 
unexpected field (unless you give this new fieldtype a custom *indexing* 
analyzer that allways throws an exception)



-Hoss

Reply via email to