Re: Reading field parameters from XML

2008-01-03 Thread Michael Mitiaguin
My initial concern was not about efficiency , but that using xml to make code more generic results in far from from elegant if/else checks for each of Field.Store , Field.Index , Field.TermVector. I'd prefer suggested way to make initial preparations to create the maps and then have an assignm

Re: Reading field parameters from XML

2008-01-03 Thread Erick Erickson
Do you have any evidence at all that this is worth the effort? I assume that you're worried about efficiency. In my experience, this is *very* often a mis-placed concern. And "efficient" code that saves, say, even 1% of my run time is *not* worth the hours/days/weeks spent creating and *maintaining

Re: Reading field parameters from XML

2008-01-02 Thread Shai Erera
Hi You could create a three static maps between the String and and appropriate Index/Store/TermVector objects. Those maps are not expensive, and are far more efficient than the String comparisons ... If you choose to stick with String comparisons, you might wanna check using Collator instead of St

Reading field parameters from XML

2008-01-02 Thread Michael Mitiaguin
I want to keep index parameters in XML. e.g. May I avoid switch/case , if/else in my code and assign somehow Field.Store, Field.Index and etc... based on string value. - To unsubscribe, e-mail: [EMAIL PROTECTED] For a